Re: [PATCH v2 1/5] btrfs-progs: image: Refactor fixup_devices() to fixup_chunks_and_devices()

2018-12-04 Thread Qu Wenruo
On 2018/12/4 下午6:20, David Sterba wrote: > On Tue, Nov 27, 2018 at 04:38:24PM +0800, Qu Wenruo wrote: >> +error: >> +error( >> +"failed to fix chunks and devices mapping, the fs may not be mountable: %s", >> +strerror(-ret)); > > Recently the sterror(error code) have been

Re: [PATCH v2 1/5] btrfs-progs: image: Refactor fixup_devices() to fixup_chunks_and_devices()

2018-12-04 Thread Qu Wenruo
On 2018/12/4 下午6:18, David Sterba wrote: > On Tue, Nov 27, 2018 at 04:50:57PM +0800, Qu Wenruo wrote: -static int fixup_devices(struct btrfs_fs_info *fs_info, - struct mdrestore_struct *mdres, off_t dev_size) +static int fixup_device_size(struct

Re: [PATCH v2 1/5] btrfs-progs: image: Refactor fixup_devices() to fixup_chunks_and_devices()

2018-12-04 Thread David Sterba
On Tue, Nov 27, 2018 at 04:38:24PM +0800, Qu Wenruo wrote: > +error: > + error( > +"failed to fix chunks and devices mapping, the fs may not be mountable: %s", > + strerror(-ret)); Recently the sterror(error code) have been converted to %m, so I changed this to errno =

Re: [PATCH v2 1/5] btrfs-progs: image: Refactor fixup_devices() to fixup_chunks_and_devices()

2018-12-04 Thread David Sterba
On Tue, Nov 27, 2018 at 04:50:57PM +0800, Qu Wenruo wrote: > >> -static int fixup_devices(struct btrfs_fs_info *fs_info, > >> - struct mdrestore_struct *mdres, off_t dev_size) > >> +static int fixup_device_size(struct btrfs_trans_handle *trans, > >> + struct

Re: [PATCH v2 1/5] btrfs-progs: image: Refactor fixup_devices() to fixup_chunks_and_devices()

2018-11-27 Thread Nikolay Borisov
On 27.11.18 г. 10:50 ч., Qu Wenruo wrote: > > > On 2018/11/27 下午4:46, Nikolay Borisov wrote: >> >> >> On 27.11.18 г. 10:38 ч., Qu Wenruo wrote: >>> Current fixup_devices() will only remove DEV_ITEMs and reset DEV_ITEM >>> size. >>> Later we need to do more fixup works, so change the name to

Re: [PATCH v2 1/5] btrfs-progs: image: Refactor fixup_devices() to fixup_chunks_and_devices()

2018-11-27 Thread Qu Wenruo
On 2018/11/27 下午4:46, Nikolay Borisov wrote: > > > On 27.11.18 г. 10:38 ч., Qu Wenruo wrote: >> Current fixup_devices() will only remove DEV_ITEMs and reset DEV_ITEM >> size. >> Later we need to do more fixup works, so change the name to >> fixup_chunks_and_devices() and refactor the original

Re: [PATCH v2 1/5] btrfs-progs: image: Refactor fixup_devices() to fixup_chunks_and_devices()

2018-11-27 Thread Nikolay Borisov
On 27.11.18 г. 10:38 ч., Qu Wenruo wrote: > Current fixup_devices() will only remove DEV_ITEMs and reset DEV_ITEM > size. > Later we need to do more fixup works, so change the name to > fixup_chunks_and_devices() and refactor the original device size fixup > to fixup_device_size(). > >

[PATCH v2 1/5] btrfs-progs: image: Refactor fixup_devices() to fixup_chunks_and_devices()

2018-11-27 Thread Qu Wenruo
Current fixup_devices() will only remove DEV_ITEMs and reset DEV_ITEM size. Later we need to do more fixup works, so change the name to fixup_chunks_and_devices() and refactor the original device size fixup to fixup_device_size(). Signed-off-by: Qu Wenruo --- image/main.c | 52