Re: Remarks regarding sparse_super2 feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Theodore Ts'o wrote:
On Sat, Apr 30, 2016 at 05:23:58PM +0200, Damien Guibouret wrote:

[...]


For the other case (shrinking the fs) at line 856:
			if (last_bg > 1 &&
			    old_fs->super->s_backup_bgs[1] == old_last_bg)
				fs->super->s_backup_bgs[1] = last_bg;
what ensures the location where the new super block backup will be set is a
free block?


This is handled by reserve_sparse2_last_group().  We have to deal this
sort of thing whenever we need to do things like grow the group
descriptors, and we will relocate data blocks as necessary to make
room for blocks that have to be at specific locations.  (This means we
have allocate new blocks for the blocks we are moving, copy the data
blocks, and then update the inode(s) to point the new block
locations.)

Cheers,

						- Ted

Hello,

Thanks for the feedback.
For the last point, you're right, I did not look deep enough in the remaining part of the code (and it looks obvious that when shrinking the fs, there is some need to reallocate blocks).

Regards,

Damien
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux