Skip to content

filesystems-minfs: mark superblock buffer head as dirty #313

Open

Description

@Bingqiang-Jing

I think there is just update sbi (struct minfs_sb_info) but not sbi->sbh (struct minfs_super_block).

kernel/minfs.c:332

	/* TODO 7/2: Mark the inode as used in the bitmap and mark
	 * the superblock buffer head as dirty.
	 */
	__test_and_set_bit(idx, &sbi->imap);
	mark_buffer_dirty(sbi->sbh);

       
       /********* fix like this ? ********/
       __test_and_set_bit(idx, &sbi->imap);

       /* update sbi->sbh */
       struct minfs_super_block *ms;
       ms = (struct minfs_super_block *)(sbi->sbh->b_data);
       ms->imap = sbi->imap;

       mark_buffer_dirty(sbi->sbh);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions