Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Bingqiang-Jing opened this issue Mar 17, 2022 · 0 comments
Open

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

Bingqiang-Jing opened this issue Mar 17, 2022 · 0 comments

Comments

@Bingqiang-Jing
Copy link

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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant