Re: [PATCH] btrfs-progs: rescue-zero-log: Modify super block directly

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

 



On Fri, Nov 01, 2019 at 10:56:36AM +0000, Qu WenRuo wrote:
> >> +	btrfs_csum_data(btrfs_super_csum_type(sb), (u8 *)sb + BTRFS_CSUM_SIZE,
> >> +			result, BTRFS_SUPER_INFO_SIZE - BTRFS_CSUM_SIZE);
> >> +	memcpy(&sb->csum[0], result, BTRFS_CSUM_SIZE);
> >> +	ret = pwrite64(fd, sb, BTRFS_SUPER_INFO_SIZE, BTRFS_SUPER_INFO_OFFSET);
> > 
> > So this only writes on the one device that's passed to the command.
> > Previously it would update superblocks on all devices.
> 
> Oh, you got me.
> 
> That's indeed the case. I guess we need to do the same skip_bg behavior
> just like kernel to handle multiple devices.

In progs we can add another mode for open_ctree to open only devices,
then iterate over their superblocks and update it in place.



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux