Hi, 在 2024/03/19 10:13, Matthew Sakai 写道: > > On 3/18/24 21:43, Yu Kuai wrote: >> Hi, >> >> 在 2024/03/19 9:18, Yu Kuai 写道: >>> Hi, >>> >>> 在 2024/03/18 17:39, Christian Brauner 写道: >>>> On Sat, Mar 16, 2024 at 10:49:33AM +0800, Yu Kuai wrote: >>>>> Hi, Christian >>>>> >>>>> 在 2024/03/15 21:54, Christian Brauner 写道: >>>>>> On Fri, Mar 15, 2024 at 08:08:49PM +0800, Yu Kuai wrote: >>>>>>> Hi, Christian >>>>>>> Hi, Christoph >>>>>>> Hi, Jan >>>>>>> >>>>>>> Perhaps now is a good time to send a formal version of this set. >>>>>>> However, I'm not sure yet what branch should I rebase and send >>>>>>> this set. >>>>>>> Should I send to the vfs tree? >>>>>> >>>>>> Nearly all of it is in fs/ so I'd say yes. >>>>>> . >>>>> >>>>> I see that you just create a new branch vfs.fixes, perhaps can I >>>>> rebase >>>>> this set against this branch? >>>> >>>> Please base it on vfs.super. I'll rebase it to v6.9-rc1 on Sunday. >>> >>> Okay, I just see that vfs.super doesn't contain commit >>> 1cdeac6da33f("btrfs: pass btrfs_device to btrfs_scratch_superblocks()"), >>> and you might need to fix the conflict at some point. >> >> And there is another problem, dm-vdo doesn't exist in vfs.super yet. Do >> you still want me to rebase here? >> > > The dm-vdo changes don't appear to rely on earlier patches in the > series, so I think dm-vdo could incorporate the dm-vdo patch > independently from the rest of the series, if that would be helpful. (I > don't want to confuse things too much.) In that case it would go through > the dm tree with the rest of dm-vdo. We want to remove the 'bd_inode' field in this set. And if we want to go through dm tree for dm-vdo changes, we must keep the field for now. I don't have preference, Christian will make the decision. 😉 Thanks, Kuai > > Matt > > . >
On 3/18/24 21:43, Yu Kuai wrote:
> Hi,
>
> 在 2024/03/19 9:18, Yu Kuai 写道:
>> Hi,
>>
>> 在 2024/03/18 17:39, Christian Brauner 写道:
>>> On Sat, Mar 16, 2024 at 10:49:33AM +0800, Yu Kuai wrote:
>>>> Hi, Christian
>>>>
>>>> 在 2024/03/15 21:54, Christian Brauner 写道:
>>>>> On Fri, Mar 15, 2024 at 08:08:49PM +0800, Yu Kuai wrote:
>>>>>> Hi, Christian
>>>>>> Hi, Christoph
>>>>>> Hi, Jan
>>>>>>
>>>>>> Perhaps now is a good time to send a formal version of this set.
>>>>>> However, I'm not sure yet what branch should I rebase and send
>>>>>> this set.
>>>>>> Should I send to the vfs tree?
>>>>>
>>>>> Nearly all of it is in fs/ so I'd say yes.
>>>>> .
>>>>
>>>> I see that you just create a new branch vfs.fixes, perhaps can I rebase
>>>> this set against this branch?
>>>
>>> Please base it on vfs.super. I'll rebase it to v6.9-rc1 on Sunday.
>>
>> Okay, I just see that vfs.super doesn't contain commit
>> 1cdeac6da33f("btrfs: pass btrfs_device to btrfs_scratch_superblocks()"),
>> and you might need to fix the conflict at some point.
>
> And there is another problem, dm-vdo doesn't exist in vfs.super yet. Do
> you still want me to rebase here?
>
The dm-vdo changes don't appear to rely on earlier patches in the
series, so I think dm-vdo could incorporate the dm-vdo patch
independently from the rest of the series, if that would be helpful. (I
don't want to confuse things too much.) In that case it would go through
the dm tree with the rest of dm-vdo.
Matt
The issue has been fixed by this patch, pls ignore this report, thanks. https://lore.kernel.org/linux-block/CAHj4cs8F0KzdqDdJcOaTf2Nk4P7Dg1H8ooBFrZQM-iMwBx=OWw@mail.gmail.com/ On Mon, Mar 18, 2024 at 11:22 AM Yi Zhang <yi.zhang@redhat.com> wrote: > > Hi > CKI recently reported one 100% reproduced panic[2] during blktests > nbd/003 on mainline from Mar 12, We didn't bisect it, but the first > commit we hit the problem was[1], pls help check it. > > [1] > Commit message: Merge tag 'vfs-6.9.uuid' of > git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs (6.8.0, > mainline.kernel.org, 0f1a8766) > > [2] > [ 1958.972721] run blktests nbd/003 at 2024-03-17 00:17:54 > [ 1960.191937] mount_clear_soc: attempt to access beyond end of device > [ 1960.191937] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1960.192975] EXT4-fs (nbd0): unable to read superblock > [ 1960.194390] nbd0: detected capacity change from 0 to 20971520 > [ 1960.195259] block nbd0: shutting down sockets > [ 1960.196731] I/O error, dev nbd0, sector 0 op 0x0:(READ) flags 0x0 > phys_seg 4 prio class 0 > [ 1960.197458] Buffer I/O error on dev nbd0, logical block 0, async page read > [ 1960.197828] Buffer I/O error on dev nbd0, logical block 1, async page read > [ 1960.198176] Buffer I/O error on dev nbd0, logical block 2, async page read > [ 1960.198521] Buffer I/O error on dev nbd0, logical block 3, async page read > [ 1960.200421] I/O error, dev nbd0, sector 0 op 0x0:(READ) flags 0x0 > phys_seg 4 prio class 0 > [ 1960.200918] Buffer I/O error on dev nbd0, logical block 0, async page read > [ 1960.201272] Buffer I/O error on dev nbd0, logical block 1, async page read > [ 1960.201638] Buffer I/O error on dev nbd0, logical block 2, async page read > [ 1960.202004] Buffer I/O error on dev nbd0, logical block 3, async page read > [ 1960.202385] ldm_validate_partition_table(): Disk read failed. > [ 1960.203201] nbd0: unable to read partition table > [ 1960.203846] nbd0: partition table beyond EOD, truncated > [ 1960.204135] mount_clear_soc: attempt to access beyond end of device > [ 1960.204135] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1960.205131] EXT4-fs (nbd0): unable to read superblock > [ 1960.205951] mount_clear_soc: attempt to access beyond end of device > [ 1960.205951] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1960.207020] EXT4-fs (nbd0): unable to read superblock > [ 1960.207852] mount_clear_soc: attempt to access beyond end of device > [ 1960.207852] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1960.208991] EXT4-fs (nbd0): unable to read superblock > [ 1960.209915] mount_clear_soc: attempt to access beyond end of device > [ 1960.209915] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1960.211011] EXT4-fs (nbd0): unable to read superblock > [ 1960.211874] mount_clear_soc: attempt to access beyond end of device > [ 1960.211874] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1960.213030] EXT4-fs (nbd0): unable to read superblock > [ 1960.213940] mount_clear_soc: attempt to access beyond end of device > [ 1960.213940] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1960.215014] EXT4-fs (nbd0): unable to read superblock > [ 1960.215979] mount_clear_soc: attempt to access beyond end of device > [ 1960.215979] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1960.217080] EXT4-fs (nbd0): unable to read superblock > [ 1960.218108] mount_clear_soc: attempt to access beyond end of device > [ 1960.218108] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1960.219179] EXT4-fs (nbd0): unable to read superblock > [ 1960.220240] mount_clear_soc: attempt to access beyond end of device > [ 1960.220240] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1960.221301] EXT4-fs (nbd0): unable to read superblock > [ 1960.222232] EXT4-fs (nbd0): unable to read superblock > [ 1960.223184] EXT4-fs (nbd0): unable to read superblock > [ 1960.2515XT4-fs (nbd0): unable to read superblock > [ 1960.725161] EXT4-fs (nbd0): unable to read superblock > [ 1960.726466] EXT4-fs (nbd0): unable to read superblock > [ 1960.727608] EXT4-fs (nbd0): unable to read superblock > [ 1960.728735] EXT4-fs (nbd0): unable to read superblock > [ 1960.729936] EXT4-fs (nbd0): unable to read superblock > [ 1960.731384] EXT4-fs (nbd0): unable to read superblock > [ 1960.732549] EXT4-fs (nbd0): unable to read superblock > [ 1960.733705] EXT4-fs (nbd0): unable to read superblock > [ 1960.734684] EXT4-fs (nbd0): unable to read superblock > [ 1960.736129] EXT4-fs (nbd0): unable to read superblock > [ 1960.737279] EXT4-fs (nbd0): unable to read superblock > [ 1960.738602] EXT4-fs (nbd0): unable to read superblock > [ 1960.739782] EXT4-fs (nbd0): unable to read superblock > [ 1960.740977] EXT4-fs (nbd0): unable to read superblock > [ 1960.742091] EXT4-fs (nbd0): unable to read superblock > [ 1960.743224] EXT4-fs (nbd0): unable to read superblock > [ 1960.744431] EXT4-fs (nbd0): unable to read superblock > [ 1960.745712] EXT4-fs (nbd0): unable to read superblock > [ 1960.747001] EXT4-fs (nbd0): unable to read superblock > [ 1960.748272] EXT4-fs (nbd0): unable to read superblock > [ 1960.749417] EXT4-fs (nbd0): unable to read super[ 1961.240923] > EXT4-fs (nbd0): unable to read superblock > [ 1961.251356] EXT4-fs (nbd0): unable to read superblock > [ 1961.252550] EXT4-fs (nbd0): unable to read superblock > [ 1961.254150] EXT4-fs (nbd0): unable to read superblock > [ 1961.255535] EXT4-fs (nbd0): unable to read superblock > [ 1961.256591] EXT4-fs (nbd0): unable to read superblock > [ 1961.257787] EXT4-fs (nbd0): unable to read superblock > [ 1961.258931] EXT4-fs (nbd0): unable to read superblock > [ 1961.259970] EXT4-fs (nbd0): unable to read superblock > [ 1961.261323] EXT4-fs (nbd0): unable to read superblock > [ 1961.262494] EXT4-fs (nbd0): unable to read superblock > [ 1961.263715] EXT4-fs (nbd0): unable to read superblock > [ 1961.264991] EXT4-fs (nbd0): unable to read superblock > [ 1961.266122] EXT4-fs (nbd0): unable to read superblock > [ 1961.267279] EXT4-fs (nbd0): unable to read superblock > [ 1961.268437] EXT4-fs (nbd0): unable to read superblock > [ 1961.269543] EXT4-fs (nbd0): unable to read superblock > [ 1961.270535] EXT4-fs (nbd0): unable to read superblock > [ 1961.271606] EXT4-fs (nbd0): unable to read superblock > [ 1961.272626] EXT4-fs (nbd0): unable to read superblock > [ 1961.273679] EXT4-fs (nbd0): unable to read superblock > [ 1961.274721] EXT4-fs (nbd0): unable to read superblock[ 1961.769303] > EXT4-fs (nbd0): unable to read superblock > [ 1961.776594] EXT4-fs (nbd0): unable to read superblock > [ 1961.777954] EXT4-fs (nbd0): unable to read superblock > [ 1961.779495] EXT4-fs (nbd0): unable to read superblock > [ 1961.780668] EXT4-fs (nbd0): unable to read superblock > [ 1961.781779] EXT4-fs (nbd0): unable to read superblock > [ 1961.782660] EXT4-fs (nbd0): unable to read superblock > [ 1961.783670] EXT4-fs (nbd0): unable to read superblock > [ 1961.784746] EXT4-fs (nbd0): unable to read superblock > [ 1961.785656] EXT4-fs (nbd0): unable to read superblock > [ 1961.786988] EXT4-fs (nbd0): unable to read superblock > [ 1961.788270] EXT4-fs (nbd0): unable to read superblock > [ 1961.789463] EXT4-fs (nbd0): unable to read superblock > [ 1961.790684] EXT4-fs (nbd0): unable to read superblock > [ 1961.791758] EXT4-fs (nbd0): unable to read superblock > [ 1961.792764] EXT4-fs (nbd0): unable to read superblock > [ 1961.793864] EXT4-fs (nbd0): unable to read superblock > [ 1961.794883] EXT4-fs (nbd0): unable to read superblock > [ 1961.795889] EXT4-fs (nbd0): unable to read superblock > [ 1961.796912] EXT4-fs (nbd0): unable to read superblock > [ 1961.797982] EXT4-fs (nbd0): unable to read superblock > [ 1961.799208] EXT4-fs (nbd0): unable to read superblock > [ 1961.800292] EXT4-fs (nbd0): unable to read superblock > [ 1961.801355] EXT4-fs (nbd0): unable to read superblock > [ 1961.802389] EXT4-fperblock > [ 1962.303795] EXT4-fs (nbd0): unable to read superblock > [ 1962.305132] EXT4-fs (nbd0): unable to read superblock > [ 1962.306409] EXT4-fs (nbd0): unable to read superblock > [ 1962.307708] EXT4-fs (nbd0): unable to read superblock > [ 1962.308935] EXT4-fs (nbd0): unable to read superblock > [ 1962.310120] EXT4-fs (nbd0): unable to read superblock > [ 1962.311294] EXT4-fs (nbd0): unable to read superblock > [ 1962.312513] EXT4-fs (nbd0): unable to read superblock > [ 1962.313702] EXT4-fs (nbd0): unable to read superblock > [ 1962.314682] EXT4-fs (nbd0): unable to read superblock > [ 1962.315748] EXT4-fs (nbd0): unable to read superblock > [ 1962.316891] EXT4-fs (nbd0): unable to read superblock > [ 1962.318041] EXT4-fs (nbd0): unable to read superblock > [ 1962.319213] EXT4-fs (nbd0): unable to read superblock > [ 1962.320443] EXT4-fs (nbd0): unable to read superblock > [ 1962.321536] EXT4-fs (nbd0): unable to read superblock > [ 1962.322579] EXT4-fs (nbd0): unable to read superblock > [ 1962.323626] EXT4-fs (nbd0): unable to read superblock > [ 1962.324674] EXT4-fs (nbd0): unable to read superblock > [ 1962.325620] EXT4-fs (nbd0): unable to read superblock > [ 1962.326700] EXT4-fs (nbd0): unable to read superblock > [ 1962.327640] EXT4-fperblock > [ 1962.828982] EXT4-fs (nbd0): unable to read superblock > [ 1962.830270] EXT4-fs (nbd0): unable to read superblock > [ 1962.831500] EXT4-fs (nbd0): unable to read superblock > [ 1962.832782] EXT4-fs (nbd0): unable to read superblock > [ 1962.833862] EXT4-fs (nbd0): unable to read superblock > [ 1962.835039] EXT4-fs (nbd0): unable to read superblock > [ 1962.836420] EXT4-fs (nbd0): unable to read superblock > [ 1962.837434] EXT4-fs (nbd0): unable to read superblock > [ 1962.838755] EXT4-fs (nbd0): unable to read superblock > [ 1962.839996] EXT4-fs (nbd0): unable to read superblock > [ 1962.841161] EXT4-fs (nbd0): unable to read superblock > [ 1962.842484] EXT4-fs (nbd0): unable to read superblock > [ 1962.843745] EXT4-fs (nbd0): unable to read superblock > [ 1962.844748] EXT4-fs (nbd0): unable to read superblock > [ 1962.845678] EXT4-fs (nbd0): unable to read superblock > [ 1962.846676] EXT4-fs (nbd0): unable to read superblock > [ 1962.847650] EXT4-fs (nbd0): unable to read superblock > [ 1962.848708] EXT4-fs (nbd0): unable to read superblock > [ 1962.849657] EXT4-fs (nbd0): unable to read superblock > [ 1962.850658] EXT4-fs (nbd0): unable to read superblock > [ 1962.851653] EXT4-fs (nbd0): unable to read superblock > [ 1962.852571] EXT4-fs (nbd0): unable to read supeXT4-fs (nbd0): > unable to read superblock > [ 1963.254601] EXT4-fs (nbd0): unable to read superblock > [ 1963.255816] EXT4-fs (nbd0): unable to read superblock > [ 1963.257007] EXT4-fs (nbd0): unable to read superblock > [ 1963.258287] EXT4-fs (nbd0): unable to read superblock > [ 1963.259540] EXT4-fs (nbd0): unable to read superblock > [ 1963.260949] EXT4-fs (nbd0): unable to read superblock > [ 1963.262073] EXT4-fs (nbd0): unable to read superblock > [ 1963.263255] EXT4-fs (nbd0): unable to read superblock > [ 1963.264556] EXT4-fs (nbd0): unable to read superblock > [ 1963.265629] EXT4-fs (nbd0): unable to read superblock > [ 1963.266712] EXT4-fs (nbd0): unable to read superblock > [ 1963.267759] EXT4-fs (nbd0): unable to read superblock > [ 1963.268781] EXT4-fs (nbd0): unable to read superblock > [ 1963.269994] EXT4-fs (nbd0): unable to read superblock > [ 1963.271123] EXT4-fs (nbd0): unable to read superblock > [ 1963.272488] EXT4-fs (nbd0): unable to read superblock > [ 1963.273740] EXT4-fs (nbd0): unable to read superblock > [ 1963.274963] EXT4-fs (nbd0): unable to read superblock > [ 1963.276084] EXT4-fs (nbd0): unable to read superblock > [ 1963.277491] EXT4-fs (nperblock > [ 1963.778803] EXT4-fs (nbd0): unable to read superblock > [ 1963.780006] EXT4-fs (nbd0): unable to read superblock > [ 1963.781222] EXT4-fs (nbd0): unable to read superblock > [ 1963.782590] EXT4-fs (nbd0): unable to read superblock > [ 1963.783705] EXT4-fs (nbd0): unable to read superblock > [ 1963.784871] EXT4-fs (nbd0): unable to read superblock > [ 1963.786064] EXT4-fs (nbd0): unable to read superblock > [ 1963.787274] EXT4-fs (nbd0): unable to read superblock > [ 1963.788490] EXT4-fs (nbd0): unable to read superblock > [ 1963.789886] EXT4-fs (nbd0): unable to read superblock > [ 1963.791190] EXT4-fs (nbd0): unable to read superblock > [ 1963.792375] EXT4-fs (nbd0): unable to read superblock > [ 1963.793567] EXT4-fs (nbd0): unable to read superblock > [ 1963.795024] EXT4-fs (nbd0): unable to read superblock > [ 1963.796257] EXT4-fs (nbd0): unable to read superblock > [ 1963.797488] EXT4-fs (nbd0): unable to read superblock > [ 1963.798578] EXT4-fs (nbd0): unable to read superblock > [ 1963.799581] EXT4-fs (nbd0): unable to read superblock > [ 1963.800628] EXT4-fs (nbd0): unable to read superblock > [ 1963.801746] EXT4-fs (nbd0): unable to read superblock > [ 1963.802954] EXT4-fs (nbd0): unable to read superblock > [ 1963XT4-fs (nbd0): unable to read superblock > [ 1964.304751] EXT4-fs (nbd0): unable to read superblock > [ 1964.305880] EXT4-fs (nbd0): unable to read superblock > [ 1964.307073] EXT4-fs (nbd0): unable to read superblock > [ 1964.308417] EXT4-fs (nbd0): unable to read superblock > [ 1964.309567] EXT4-fs (nbd0): unable to read superblock > [ 1964.310702] EXT4-fs (nbd0): unable to read superblock > [ 1964.311732] EXT4-fs (nbd0): unable to read superblock > [ 1964.312797] EXT4-fs (nbd0): unable to read superblock > [ 1964.313966] EXT4-fs (nbd0): unable to read superblock > [ 1964.315098] EXT4-fs (nbd0): unable to read superblock > [ 1964.316325] EXT4-fs (nbd0): unable to read superblock > [ 1964.317292] EXT4-fs (nbd0): unable to read superblock > [ 1964.318254] EXT4-fs (nbd0): unable to read superblock > [ 1964.319484] EXT4-fs (nbd0): unable to read superblock > [ 1964.320690] EXT4-fs (nbd0): unable to read superblock > [ 1964.321654] EXT4-fs (nbd0): unable to read superblock > [ 1964.322677] EXT4-fs (nbd0): unable to read superblock > [ 1964.323821] EXT4-fs (nbd0): unable to read superblock > [ 1964.325088] EXT4-fs (nbd0): unable to read s[ 1964.826671] EXT4-fs > (nbd0): unable to read superblock > [ 1964.827837] EXT4-fs (nbd0): unable to read superblock > [ 1964.829110] EXT4-fs (nbd0): unable to read superblock > [ 1964.830370] EXT4-fs (nbd0): unable to read superblock > [ 1964.831591] EXT4-fs (nbd0): unable to read superblock > [ 1964.832720] EXT4-fs (nbd0): unable to read superblock > [ 1964.833711] EXT4-fs (nbd0): unable to read superblock > [ 1964.834904] EXT4-fs (nbd0): unable to read superblock > [ 1964.836119] EXT4-fs (nbd0): unable to read superblock > [ 1964.837462] EXT4-fs (nbd0): unable to read superblock > [ 1964.838563] EXT4-fs (nbd0): unable to read superblock > [ 1964.839732] EXT4-fs (nbd0): unable to read superblock > [ 1964.841018] EXT4-fs (nbd0): unable to read superblock > [ 1964.842147] EXT4-fs (nbd0): unable to read superblock > [ 1964.843357] EXT4-fs (nbd0): unable to read superblock > [ 1964.844368] EXT4-fs (nbd0): unable to read superblock > [ 1964.845506] EXT4-fs (nbd0): unable to read superblock > [ 1964.846639] EXT4-fs (nbd0): unable to read superblock > [ 1964.847537] EXT4-fs (nbd0): unable to read superblock > [ 1964.848711] EXT4-fs (nbd0): unable to read superblock > [ 1964.879io_check_eod: 226 callbacks suppressed > [ 1965.302867] mount_clear_soc: attempt to access beyond end of device > [ 1965.302867] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1965.351009] EXT4-fs (nbd0): unable to read superblock > [ 1965.352242] mount_clear_soc: attempt to access beyond end of device > [ 1965.352242] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1965.353307] EXT4-fs (nbd0): unable to read superblock > [ 1965.354610] mount_clear_soc: attempt to access beyond end of device > [ 1965.354610] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1965.355613] EXT4-fs (nbd0): unable to read superblock > [ 1965.356798] mount_clear_soc: attempt to access beyond end of device > [ 1965.356798] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1965.357890] EXT4-fs (nbd0): unable to read superblock > [ 1965.358943] mount_clear_soc: attempt to access beyond end of device > [ 1965.358943] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1965.360117] EXT4-fs (nbd0): unable to read superblock > [ 1965.361191] mount_clear_soc: attempt to access beyond end of device > [ 1965.361191] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1965.362233] EXT4-fs (nbd0): unable to read superblock > [ 1965.363217] mount_clear_soc: attempt to access beyond end of device > [nr_sectors = 2 limit=0 > [ 1965.864302] EXT4-fs (nbd0): unable to read superblock > [ 1965.865571] mount_clear_soc: attempt to access beyond end of device > [ 1965.865571] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1965.866591] EXT4-fs (nbd0): unable to read superblock > [ 1965.867786] mount_clear_soc: attempt to access beyond end of device > [ 1965.867786] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1965.868906] EXT4-fs (nbd0): unable to read superblock > [ 1965.870151] EXT4-fs (nbd0): unable to read superblock > [ 1965.871487] EXT4-fs (nbd0): unable to read superblock > [ 1965.872595] EXT4-fs (nbd0): unable to read superblock > [ 1965.873736] EXT4-fs (nbd0): unable to read superblock > [ 1965.874997] EXT4-fs (nbd0): unable to read superblock > [ 1965.876149] EXT4-fs (nbd0): unable to read superblock > [ 1965.877479] EXT4-fs (nbd0): unable to read superblock > [ 1965.879177] EXT4-fs (nbd0): unable to read superblock > [ 1965.880498] EXT4-fs (nbd0): unable to read superblock > [ 1965.881584] EXT4-fs (nbd0): unable to read superblock > [ 1965.882842] EXT4-fs (nbd0): unable toperblock > [ 1966.384383] EXT4-fs (nbd0): unable to read superblock > [ 1966.385648] EXT4-fs (nbd0): unable to read superblock > [ 1966.386939] EXT4-fs (nbd0): unable to read superblock > [ 1966.388125] EXT4-fs (nbd0): unable to read superblock > [ 1966.389459] EXT4-fs (nbd0): unable to read superblock > [ 1966.390748] EXT4-fs (nbd0): unable to read superblock > [ 1966.392003] EXT4-fs (nbd0): unable to read superblock > [ 1966.393201] EXT4-fs (nbd0): unable to read superblock > [ 1966.394544] EXT4-fs (nbd0): unable to read superblock > [ 1966.395743] EXT4-fs (nbd0): unable to read superblock > [ 1966.396833] EXT4-fs (nbd0): unable to read superblock > [ 1966.397799] EXT4-fs (nbd0): unable to read superblock > [ 1966.398971] EXT4-fs (nbd0): unable to read superblock > [ 1966.400179] EXT4-fs (nbd0): unable to read superblock > [ 1966.401383] EXT4-fs (nbd0): unable to read superblock > [ 1966.402472] EXT4-fs (nbd0): unable to read superblock > [ 1966.403730] EXT4-fs (nbd0): unable to read superblock > [ 1966.404791] EXT4-fs (nbd0): unable to read superblock > [ 1966.405855] EXT4-fs (nbd0): unable to read superblock > [ 196XT4-fs (nbd0): unable to read superblock > [ 1966.807515] EXT4-fs (nbd0): unable to read superblock > [ 1966.808814] EXT4-fs (nbd0): unable to read superblock > [ 1966.810034] EXT4-fs (nbd0): unable to read superblock > [ 1966.811238] EXT4-fs (nbd0): unable to read superblock > [ 1966.812577] EXT4-fs (nbd0): unable to read superblock > [ 1966.813679] EXT4-fs (nbd0): unable to read superblock > [ 1966.814928] EXT4-fs (nbd0): unable to read superblock > [ 1966.816167] EXT4-fs (nbd0): unable to read superblock > [ 1966.817551] EXT4-fs (nbd0): unable to read superblock > [ 1966.818796] EXT4-fs (nbd0): unable to read superblock > [ 1966.819914] EXT4-fs (nbd0): unable to read superblock > [ 1966.821035] EXT4-fs (nbd0): unable to read superblock > [ 1966.822430] EXT4-fs (nbd0): unable to read superblock > [ 1966.823800] EXT4-fs (nbd0): unable to read superblock > [ 1966.825156] EXT4-fs (nbd0): unable to read superblock > [ 1966.826454] EXT4-fs (nbd0): unable to read superblock > [ 1966.827617] EXT4-fs (nbd0): unable to read superblock > [ 1966.828804] EXT4-fs (nbd0): unable to read superblock > [ 1966.829741] EXT4-fs (nbd0): unable to read superblock > [ 1966.830956] EXT4-fs (nbperblock > [ 1967.332488] EXT4-fs (nbd0): unable to read superblock > [ 1967.333868] EXT4-fs (nbd0): unable to read superblock > [ 1967.335094] EXT4-fs (nbd0): unable to read superblock > [ 1967.336428] EXT4-fs (nbd0): unable to read superblock > [ 1967.337695] EXT4-fs (nbd0): unable to read superblock > [ 1967.338896] EXT4-fs (nbd0): unable to read superblock > [ 1967.340071] EXT4-fs (nbd0): unable to read superblock > [ 1967.341248] EXT4-fs (nbd0): unable to read superblock > [ 1967.342619] EXT4-fs (nbd0): unable to read superblock > [ 1967.343894] EXT4-fs (nbd0): unable to read superblock > [ 1967.345060] EXT4-fs (nbd0): unable to read superblock > [ 1967.346474] EXT4-fs (nbd0): unable to read superblock > [ 1967.347792] EXT4-fs (nbd0): unable to read superblock > [ 1967.349003] EXT4-fs (nbd0): unable to read superblock > [ 1967.350395] EXT4-fs (nbd0): unable to read superblock > [ 1967.351747] EXT4-fs (nbd0): unable to read superblock > [ 1967.352737] EXT4-fs (nbd0): unable to read superblock > [ 1967.353756] EXT4-fs (nbd0): unable to read superblock > [ 1967.355008] EXT4-fs (nbd0): unable to read superblock > [ 1967.356323] EXT4-fs (nbd0): unable to read superblock > [ 1967.357618] EXT4-fs (nbdperblock > [ 1967.858991] EXT4-fs (nbd0): unable to read superblock > [ 1967.860160] EXT4-fs (nbd0): unable to read superblock > [ 1967.861756] EXT4-fs (nbd0): unable to read superblock > [ 1967.863055] EXT4-fs (nbd0): unable to read superblock > [ 1967.864493] EXT4-fs (nbd0): unable to read superblock > [ 1967.865762] EXT4-fs (nbd0): unable to read superblock > [ 1967.867017] EXT4-fs (nbd0): unable to read superblock > [ 1967.868449] EXT4-fs (nbd0): unable to read superblock > [ 1967.869716] EXT4-fs (nbd0): unable to read superblock > [ 1967.871118] EXT4-fs (nbd0): unable to read superblock > [ 1967.872507] EXT4-fs (nbd0): unable to read superblock > [ 1967.873794] EXT4-fs (nbd0): unable to read superblock > [ 1967.875087] EXT4-fs (nbd0): unable to read superblock > [ 1967.876262] EXT4-fs (nbd0): unable to read superblock > [ 1967.877604] EXT4-fs (nbd0): unable to read superblock > [ 1967.879644] EXT4-fs (nbd0): unable to read superblock > [ 1967.880867] EXT4-fs (nbd0): unable to read superblock > [ 1967.882136] EXT4-fs (nbd0): unable to read superblock > [ 1967.883483] EXT4-fs (nbd0): unable to read superblock > [ 1967.884715] EXT4-fs (nbd0): unable to read superblock > [ 1967.886040] EXT4-fs (nbd0): unable to read superblock > [ 1967.887220] EXT4-fs (nbd0): unable to read superblock > [ 1967.888566] EXT4-fs (nbd0): unable to read superblock > [ 1967.889673] EXT4-fs (nbd0): unable to read superblock > [ 1967.890897] EXT4-fs (nbd0): unable to read superblock > [ 1967.892052] EXT4-fs (nbd0):nable to read superblock > [ 1968.393772] EXT4-fs (nbd0): unable to read superblock > [ 1968.395087] EXT4-fs (nbd0): unable to read superblock > [ 1968.396414] EXT4-fs (nbd0): unable to read superblock > [ 1968.397752] EXT4-fs (nbd0): unable to read superblock > [ 1968.399036] EXT4-fs (nbd0): unable to read superblock > [ 1968.400338] EXT4-fs (nbd0): unable to read superblock > [ 1968.401699] EXT4-fs (nbd0): unable to read superblock > [ 1968.402928] EXT4-fs (nbd0): unable to read superblock > [ 1968.404187] EXT4-fs (nbd0): unable to read superblock > [ 1968.405561] EXT4-fs (nbd0): unable to read superblock > [ 1968.406862] EXT4-fs (nbd0): unable to read superblock > [ 1968.408117] EXT4-fs (nbd0): unable to read superblock > [ 1968.409472] EXT4-fs (nbd0): unable to read superblock > [ 1968.410806] EXT4-fs (nbd0): unable to read superblock > [ 1968.412001] EXT4-fs (nbd0): unable to read superblock > [ 1968.413062] EXT4-fs (nbd0): unable to read superblock > [ 1968.414294] EXT4-fs (nbd0): unable to read superblock > [ 1968.415574] EXT4-fs (nbd0): unable to read superblock > [ 1968.416864] EXT4-fs (nbd0): unable to read superblock > [ 1968.418182] EXT4-fs (nbd0): unable to read superblock > [ 1968.419594] EXT4-fs (nbd0): unable to read superblock > [ 1968.XT4-fs (nbd0): unable to read superblock > [ 1968.921536] EXT4-fs (nbd0): unable to read superblock > [ 1968.922607] EXT4-fs (nbd0): unable to read superblock > [ 1968.923842] EXT4-fs (nbd0): unable to read superblock > [ 1968.925111] EXT4-fs (nbd0): unable to read superblock > [ 1968.926578] EXT4-fs (nbd0): unable to read superblock > [ 1968.927822] EXT4-fs (nbd0): unable to read superblock > [ 1968.928951] EXT4-fs (nbd0): unable to read superblock > [ 1968.930040] EXT4-fs (nbd0): unable to read superblock > [ 1968.931187] EXT4-fs (nbd0): unable to read superblock > [ 1968.932392] EXT4-fs (nbd0): unable to read superblock > [ 1968.933534] EXT4-fs (nbd0): unable to read superblock > [ 1968.934919] EXT4-fs (nbd0): unable to read superblock > [ 1968.936053] EXT4-fs (nbd0): unable to read superblock > [ 1968.937189] EXT4-fs (nbd0): unable to read superblock > [ 1968.938516] EXT4-fs (nbd0): unable to read superblock > [ 1968.939730] EXT4-fs (nbd0): unable to read superblock > [ 1968.940939] EXT4-fs (nbd0): unable to read superblock > [ 1968.942064] EXT4-fs (nbd0): unable to read superblock > [ 1968.943292] EXT4-fs (nbd0): unable to read superblock > [ 1968.944552] EXT4-fs (nbd0): unable to read superb[ 1969.434709] > EXT4-fs (nbd0): unable to read superblock > [ 1969.446413] EXT4-fs (nbd0): unable to read superblock > [ 1969.447651] EXT4-fs (nbd0): unable to read superblock > [ 1969.448940] EXT4-fs (nbd0): unable to read superblock > [ 1969.450019] EXT4-fs (nbd0): unable to read superblock > [ 1969.451324] EXT4-fs (nbd0): unable to read superblock > [ 1969.452568] EXT4-fs (nbd0): unable to read superblock > [ 1969.453692] EXT4-fs (nbd0): unable to read superblock > [ 1969.454829] EXT4-fs (nbd0): unable to read superblock > [ 1969.456246] EXT4-fs (nbd0): unable to read superblock > [ 1969.457578] EXT4-fs (nbd0): unable to read superblock > [ 1969.458841] EXT4-fs (nbd0): unable to read superblock > [ 1969.460127] EXT4-fs (nbd0): unable to read superblock > [ 1969.461502] EXT4-fs (nbd0): unable to read superblock > [ 1969.462804] EXT4-fs (nbd0): unable to read superblock > [ 1969.463860] EXT4-fs (nbd0): unable to read superblock > [ 1969.465039] EXT4-fs (nbd0): unable to read superblock > [ 1969.465989] EXT4-fs (nbd0): unable to read superblock > [ 1969.467005] EXT4-fs (nbd0): unable to read superblock > [ 1969.468098] EXT4-fs (nbd0): unable to read superblock > [ 1969.469265] EXT4-fs (nbd0): unable to read superblock > [ 1969.470522] EXT4-fs (nbd0): unable to read superblock > [ 1969.471633] EXT4-fs (nbd0): unable to read superblocXT4-fs (nbd0): > unable to read superblock > [ 1969.873378] EXT4-fs (nbd0): unable to read superblock > [ 1969.875075] EXT4-fs (nbd0): unable to read superblock > [ 1969.876415] EXT4-fs (nbd0): unable to read superblock > [ 1969.878475] EXT4-fs (nbd0): unable to read superblock > [ 1969.879625] EXT4-fs (nbd0): unable to read superblock > [ 1969.881027] EXT4-fs (nbd0): unable to read superblock > [ 1969.882237] EXT4-fs (nbd0): unable to read superblock > [ 1969.883698] EXT4-fs (nbd0): unable to read superblock > [ 1969.884947] EXT4-fs (nbd0): unable to read superblock > [ 1969.886205] EXT4-fs (nbd0): unable to read superblock > [ 1969.887415] EXT4-fs (nbd0): unable to read superblock > [ 1969.888692] EXT4-fs (nbd0): unable to read superblock > [ 1969.889891] EXT4-fs (nbd0): unable to read superblock > [ 1969.891025] EXT4-fs (nbd0): unable to read superblock > [ 1969.892109] EXT4-fs (nbd0): unable to read superblock > [ 1969.893421] EXT4-fs (nbd0): unable to read superblock > [ 1969.894754] EXT4-fs (nbd0): unable to read superblock > [ 1969.895946] EXT4-fs (nbd0): unable to read superblock > [ 1969.897157] EXT4-fs (nbd0): unable to read superblock > [ 1969.898387] EXT4-fs (nbd0): unable to read superblock > [ 1969.899713] EXT4-fs (nbd0): unable to read sperblock > [ 1970.401549] bio_check_eod: 210 callbacks suppressed > [ 1970.401554] mount_clear_soc: attempt to access beyond end of device > [ 1970.401554] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1970.403386] EXT4-fs (nbd0): unable to read superblock > [ 1970.404592] mount_clear_soc: attempt to access beyond end of device > [ 1970.404592] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1970.405660] EXT4-fs (nbd0): unable to read superblock > [ 1970.406944] mount_clear_soc: attempt to access beyond end of device > [ 1970.406944] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1970.408074] EXT4-fs (nbd0): unable to read superblock > [ 1970.409264] mount_clear_soc: attempt to access beyond end of device > [ 1970.409264] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1970.410520] EXT4-fs (nbd0): unable to read superblock > [ 1970.411704] mount_clear_soc: attempt to access beyond end of device > [ 1970.411704] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1970.412851] EXT4-fs (nbd0): unable to read superblock > [ 1970.414014] mount_clear_soc: attempt to access beyond end of device > [ 1970.414014] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1970.415097] EXT4-fs (nbd0): unable to read superblock > [ 1970.416330] mount_clear_soc: attempt to acces67120] nbd0: rw=4096, > sector=2, nr_sectors = 2 limit=0 > [ 1970.917990] EXT4-fs (nbd0): unable to read superblock > [ 1970.919273] mount_clear_soc: attempt to access beyond end of device > [ 1970.919273] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1970.920541] EXT4-fs (nbd0): unable to read superblock > [ 1970.921894] mount_clear_soc: attempt to access beyond end of device > [ 1970.921894] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1970.922979] EXT4-fs (nbd0): unable to read superblock > [ 1970.924048] EXT4-fs (nbd0): unable to read superblock > [ 1970.925234] EXT4-fs (nbd0): unable to read superblock > [ 1970.926397] EXT4-fs (nbd0): unable to read superblock > [ 1970.927619] EXT4-fs (nbd0): unable to read superblock > [ 1970.928881] EXT4-fs (nbd0): unable to read superblock > [ 1970.930101] EXT4-fs (nbd0): unable to read superblock > [ 1970.931216] EXT4-fs (nbd0): unable to read superblock > [ 1970.932587] EXT4-fs (nbd0): unable to read superblock > [ 1970.933800] EXT4-fs (nbd0): unable to read superblock > [ 1970.934921] EXT4-fs (nbd0): unable to read superblock > [ 1970.936074] EXT4-fs (nbd0): unable to read superblock > [ 1970.937272] EXT4-fs (nbd0): unable to read superblock > [ 1970.938518] EXT4-fs (nbd0): unable to read super[ 1971.439977] > EXT4-fs (nbd0): unable to read superblock > [ 1971.441138] EXT4-fs (nbd0): unable to read superblock > [ 1971.442545] EXT4-fs (nbd0): unable to read superblock > [ 1971.443886] EXT4-fs (nbd0): unable to read superblock > [ 1971.445055] EXT4-fs (nbd0): unable to read superblock > [ 1971.446192] EXT4-fs (nbd0): unable to read superblock > [ 1971.447646] EXT4-fs (nbd0): unable to read superblock > [ 1971.448964] EXT4-fs (nbd0): unable to read superblock > [ 1971.450108] EXT4-fs (nbd0): unable to read superblock > [ 1971.451538] EXT4-fs (nbd0): unable to read superblock > [ 1971.452877] EXT4-fs (nbd0): unable to read superblock > [ 1971.454019] EXT4-fs (nbd0): unable to read superblock > [ 1971.455126] EXT4-fs (nbd0): unable to read superblock > [ 1971.456541] EXT4-fs (nbd0): unable to read superblock > [ 1971.457775] EXT4-fs (nbd0): unable to read superblock > [ 1971.458936] EXT4-fs (nbd0): unable to read superblock > [ 1971.460117] EXT4-fs (nbd0): unable to read superblock > [ 1971.461490] EXT4-fs (nbd0): unable to read superblock > [ 1971.462596] EXT4-fs (nbd0): unable to read superblock > [ 1971.463902] EXT4-fs (nbd0): unable to read superblock > [ 1971.465182] EXT4-fs (nbd0): unable to read superblock > [ 1971.466450] EXT4-fs (nbd0): unable to read superblock > [ 1971.467630] EXT4-fs (nbd0): unable to read superbl[ 1971.967075] > EXT4-fs (nbd0): unable to read superblock > [ 1971.969578] EXT4-fs (nbd0): unable to read superblock > [ 1971.970836] EXT4-fs (nbd0): unable to read superblock > [ 1971.972149] EXT4-fs (nbd0): unable to read superblock > [ 1971.973543] EXT4-fs (nbd0): unable to read superblock > [ 1971.974864] EXT4-fs (nbd0): unable to read superblock > [ 1971.975870] EXT4-fs (nbd0): unable to read superblock > [ 1971.976890] EXT4-fs (nbd0): unable to read superblock > [ 1971.978414] EXT4-fs (nbd0): unable to read superblock > [ 1971.979558] EXT4-fs (nbd0): unable to read superblock > [ 1971.980639] EXT4-fs (nbd0): unable to read superblock > [ 1971.981734] EXT4-fs (nbd0): unable to read superblock > [ 1971.982758] EXT4-fs (nbd0): unable to read superblock > [ 1971.983869] EXT4-fs (nbd0): unable to read superblock > [ 1971.984783] EXT4-fs (nbd0): unable to read superblock > [ 1971.986014] EXT4-fs (nbd0): unable to read superblock > [ 1971.986920] EXT4-fs (nbd0): unable to read superblock > [ 1971.987864] EXT4-fs (nbd0): unable to read superblock > [ 1971.989016] EXT4-fs (nbd0): unable to read superblock > [ 1971.989911] EXT4-fs (nbd0): unable to read superblock > [ 1971.990761] EXT4-fs (nbd0): unable [ 1972.492289] EXT4-fs (nbd0): > unable to read superblock > [ 1972.493687] EXT4-fs (nbd0): unable to read superblock > [ 1972.494988] EXT4-fs (nbd0): unable to read superblock > [ 1972.496177] EXT4-fs (nbd0): unable to read superblock > [ 1972.497656] EXT4-fs (nbd0): unable to read superblock > [ 1972.498883] EXT4-fs (nbd0): unable to read superblock > [ 1972.500168] EXT4-fs (nbd0): unable to read superblock > [ 1972.501586] EXT4-fs (nbd0): unable to read superblock > [ 1972.502905] EXT4-fs (nbd0): unable to read superblock > [ 1972.504588] EXT4-fs (nbd0): unable to read superblock > [ 1972.505905] EXT4-fs (nbd0): unable to read superblock > [ 1972.507266] EXT4-fs (nbd0): unable to read superblock > [ 1972.508695] EXT4-fs (nbd0): unable to read superblock > [ 1972.509969] EXT4-fs (nbd0): unable to read superblock > [ 1972.511141] EXT4-fs (nbd0): unable to read superblock > [ 1972.512423] EXT4-fs (nbd0): unable to read superblock > [ 1972.513625] EXT4-fs (nbd0): unable to read superblock > [ 1972.514714] EXT4-fs (nbd0): unable to read superblock > [ 1972.516068] EXT4-fs (nbd0): unable to read superblock > [ 1972.517208] EXT4-fs (nbd0): unable to read superblock > [ 1972.548XT4-fs (nbd0): unable to read superblock > [ 1973.019078] EXT4-fs (nbd0): unable to read superblock > [ 1973.020565] EXT4-fs (nbd0): unable to read superblock > [ 1973.021932] EXT4-fs (nbd0): unable to read superblock > [ 1973.023134] EXT4-fs (nbd0): unable to read superblock > [ 1973.024605] EXT4-fs (nbd0): unable to read superblock > [ 1973.025755] EXT4-fs (nbd0): unable to read superblock > [ 1973.026872] EXT4-fs (nbd0): unable to read superblock > [ 1973.028181] EXT4-fs (nbd0): unable to read superblock > [ 1973.029412] EXT4-fs (nbd0): unable to read superblock > [ 1973.030657] EXT4-fs (nbd0): unable to read superblock > [ 1973.031930] EXT4-fs (nbd0): unable to read superblock > [ 1973.033112] EXT4-fs (nbd0): unable to read superblock > [ 1973.034274] EXT4-fs (nbd0): unable to read superblock > [ 1973.035467] EXT4-fs (nbd0): unable to read superblock > [ 1973.036672] EXT4-fs (nbd0): unable to read superblock > [ 1973.037878] EXT4-fs (nbd0): unable to read superblock > [ 1973.039075] EXT4-fs (nbd0): unable to read superblock > [ 1973.040057] EXT4-fs (nbd0): unable to read superblock > [ 1973.041061] EXT4-fs (nbd0): unable to read superblock > [ 1973.042092] EXT4-fs (nbd0): unable to read superblock > [ 1973.043203] EXT4-fs (nbd0): unable to read superblock > [ 1973.044258] EXT4-fs (nbd0): unable to read superblock > [ 1973.045557] EXT4-fs (nbd0): unable t[ 1973.430952] EXT4-fs (nbd0): > unable to read superblock > [ 1973.447205] EXT4-fs (nbd0): unable to read superblock > [ 1973.448741] EXT4-fs (nbd0): unable to read superblock > [ 1973.449877] EXT4-fs (nbd0): unable to read superblock > [ 1973.450919] EXT4-fs (nbd0): unable to read superblock > [ 1973.452192] EXT4-fs (nbd0): unable to read superblock > [ 1973.453600] EXT4-fs (nbd0): unable to read superblock > [ 1973.454682] EXT4-fs (nbd0): unable to read superblock > [ 1973.455893] EXT4-fs (nbd0): unable to read superblock > [ 1973.457170] EXT4-fs (nbd0): unable to read superblock > [ 1973.458317] EXT4-fs (nbd0): unable to read superblock > [ 1973.459596] EXT4-fs (nbd0): unable to read superblock > [ 1973.461197] EXT4-fs (nbd0): unable to read superblock > [ 1973.462475] EXT4-fs (nbd0): unable to read superblock > [ 1973.463621] EXT4-fs (nbd0): unable to read superblock > [ 1973.465069] EXT4-fs (nbd0): unable to read superblock > [ 1973.466208] EXT4-fs (nbd0): unable to read superblock > [ 1973.467558] EXT4-fs (nbd0): unable to read superblock > [ 1973.469073] EXT4-fs (nbd0): unable to read superblock > [ 1973.470293] EXT4-fs (nbd0): unable to read superblock > [ 1973.471588] EXT4-fs (nbd0): unable to read superblock > [ 1973.472837] EXT4-fs (nbd0): unable to read superblock > [ 1973.473753] EXT4-fs (nbd0): unable to read superblock > [ 1973.474920] EXT4-fs (nbd0): unable to read superblock > [ 1973.475938] EXT4-fs (nbd0): unable to read superblock > [ 1973.477404] EXT4-fs (nbd0): unable to[ 1973.979001] EXT4-fs (nbd0): > unable to read superblock > [ 1973.980320] EXT4-fs (nbd0): unable to read superblock > [ 1973.981812] EXT4-fs (nbd0): unable to read superblock > [ 1973.983017] EXT4-fs (nbd0): unable to read superblock > [ 1973.984322] EXT4-fs (nbd0): unable to read superblock > [ 1973.985738] EXT4-fs (nbd0): unable to read superblock > [ 1973.987155] EXT4-fs (nbd0): unable to read superblock > [ 1973.988483] EXT4-fs (nbd0): unable to read superblock > [ 1973.990115] EXT4-fs (nbd0): unable to read superblock > [ 1973.991275] EXT4-fs (nbd0): unable to read superblock > [ 1973.992552] EXT4-fs (nbd0): unable to read superblock > [ 1973.993765] EXT4-fs (nbd0): unable to read superblock > [ 1973.994944] EXT4-fs (nbd0): unable to read superblock > [ 1973.996145] EXT4-fs (nbd0): unable to read superblock > [ 1973.997285] EXT4-fs (nbd0): unable to read superblock > [ 1973.998482] EXT4-fs (nbd0): unable to read superblock > [ 1973.999627] EXT4-fs (nbd0): unable to read superblock > [ 1974.000697] EXT4-fs (nbd0): unable to read superblock > [ 1974.001706] EXT4-fs (nbd0): unable to read superblock > [ 1974.002880] EXT4-fs (nbd0): unable to read superblock > [ 1974.03[ 1974.475084] EXT4-fs (nbd0): unable to read superblock > [ 1974.505082] EXT4-fs (nbd0): unable to read superblock > [ 1974.506143] EXT4-fs (nbd0): unable to read superblock > [ 1974.507386] EXT4-fs (nbd0): unable to read superblock > [ 1974.508735] EXT4-fs (nbd0): unable to read superblock > [ 1974.510034] EXT4-fs (nbd0): unable to read superblock > [ 1974.511149] EXT4-fs (nbd0): unable to read superblock > [ 1974.512369] EXT4-fs (nbd0): unable to read superblock > [ 1974.513666] EXT4-fs (nbd0): unable to read superblock > [ 1974.514934] EXT4-fs (nbd0): unable to read superblock > [ 1974.516180] EXT4-fs (nbd0): unable to read superblock > [ 1974.517522] EXT4-fs (nbd0): unable to read superblock > [ 1974.518802] EXT4-fs (nbd0): unable to read superblock > [ 1974.519970] EXT4-fs (nbd0): unable to read superblock > [ 1974.521141] EXT4-fs (nbd0): unable to read superblock > [ 1974.522234] EXT4-fs (nbd0): unable to read superblock > [ 1974.523580] EXT4-fs (nbd0): unable to read superblock > [ 1974.524815] EXT4-fs (nbd0): unable to read superblock > [ 1974.526017] EXT4-fs (nbd0): unable to read superblock > [ 1974.527196] EXT4-fs (nbd0): unable to read superblock > [ 1974.528593] EXT4-fs (nbd0): unable to read superblock > [ 1974.529885] EXT4-fs (nbd0): unable to read superblock > [ [ 1975.031424] EXT4-fs (nbd0): unable to read superblock > [ 1975.032782] EXT4-fs (nbd0): unable to read superblock > [ 1975.034091] EXT4-fs (nbd0): unable to read superblock > [ 1975.035352] EXT4-fs (nbd0): unable to read superblock > [ 1975.036692] EXT4-fs (nbd0): unable to read superblock > [ 1975.037991] EXT4-fs (nbd0): unable to read superblock > [ 1975.039322] EXT4-fs (nbd0): unable to read superblock > [ 1975.040565] EXT4-fs (nbd0): unable to read superblock > [ 1975.041701] EXT4-fs (nbd0): unable to read superblock > [ 1975.042957] EXT4-fs (nbd0): unable to read superblock > [ 1975.044086] EXT4-fs (nbd0): unable to read superblock > [ 1975.045396] EXT4-fs (nbd0): unable to read superblock > [ 1975.046711] EXT4-fs (nbd0): unable to read superblock > [ 1975.047956] EXT4-fs (nbd0): unable to read superblock > [ 1975.048935] EXT4-fs (nbd0): unable to read superblock > [ 1975.050139] EXT4-fs (nbd0): unable to read superblock > [ 1975.051296] EXT4-fs (nbd0): unable to read superblock > [ 1975.052417] EXT4-fs (nbd0): unable to read superblock > [ 1975.053654] EXT4-fs (nbd0): unable to read superblock > [ 1975.054968] EXT4-fs (nbd0): unable to read superblock > [ 1975.08[ 1975.531562] bio_check_eod: 215 callbacks suppressed > [ 1975.531566] mount_clear_soc: attempt to access beyond end of device > [ 1975.531566] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1975.557154] EXT4-fs (nbd0): unable to read superblock > [ 1975.558576] mount_clear_soc: attempt to access beyond end of device > [ 1975.558576] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1975.559633] EXT4-fs (nbd0): unable to read superblock > [ 1975.560951] mount_clear_soc: attempt to access beyond end of device > [ 1975.560951] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1975.561954] EXT4-fs (nbd0): unable to read superblock > [ 1975.563104] mount_clear_soc: attempt to access beyond end of device > [ 1975.563104] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1975.564184] EXT4-fs (nbd0): unable to read superblock > [ 1975.565473] mount_clear_soc: attempt to access beyond end of device > [ 1975.565473] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1975.566587] EXT4-fs (nbd0): unable to read superblock > [ 1975.567951] mount_clear_soc: attempt to access beyond end of device > [ 1975.567951] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1975.569011] EXT4-fs (nbd0): unable to read superblock > [ 1975.570196] mount_clear_soc: attempt to access beyond end of device > [ 1975.570196] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ s beyond end of device > [ 1975.771395] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1975.965355] BUG: kernel NULL pointer dereference, address: 0000000000000000 > [ 1975.965358] #PF: supervisor instruction fetch in kernel mode > [ 1975.965360] #PF: error_code(0x0010) - not-present page > [ 1975.965362] PGD 0 P4D 0 > [ 1975.965365] Oops: 0010 [#1] PREEMPT SMP PTI > [ 1975.965369] CPU: 26 PID: 0 Comm: swapper/26 Tainted: G W I > 6.8.0 #1 > [ 1975.965373] Hardware name: HP ProLiant DL360e Gen8, BIOS P73 05/24/2019 > [ 1975.965375] RIP: 0010:0x0 > [ 1976.072029] EXT4-fs (nbd0): unable to read superblock > [ 1976.072297] Code: Unable to access opcode bytes at 0xffffffffffffffd6. > [ 1976.073790] mount_clear_soc: attempt to access beyond end of device > [ 1976.073790] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1976.074355] RSP: 0018:ffffb79741fc0eb8 EFLAGS: 00010282 > [ 1976.074709] EXT4-fs (nbd0): unable to read superblock > [ 1976.074822] > [ 1976.075594] mount_clear_soc: attempt to access beyond end of device > [ 1976.075594] nbd0: rw=4096, sector=2, nr_sectors = 2 limit=0 > [ 1976.076338] RAX: 0000000000000001 RBX: 0000000000000003 RCX: 0000000000000000 > [ 1976.076624] EXT4-fs (nbd0): unable to read superblock > [ 1976.076870] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff94d18d952ce8 > [ 1976.077974] EXT4-fs (nbd0): unable to read superblock > [ 1976.078348] RBP: ffff94d2[ 1976.080108] R13: ffffb79741fc0ef0 R14: > 0000000000000002 R15: 0000000000000000 > [ 1976.080111] FS: 0000000000000000(0000) GS:ffff94d4b7900000(0000) > knlGS:0000000000000000 > [ 1976.080983] EXT4-fs (nbd0): unable to read superblock > [ 1976.247337] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [ 1976.247340] CR2: ffffffffffffffd6 CR3: 00000000b8422003 CR4: 00000000000606f0 > [ 1976.247343] Call Trace: > [ 1976.247345] <IRQ> > [ 1976.247346] ? __die+0x23/0x70 > [ 1976.247353] ? page_fault_oops+0x170/0x580 > [ 1976.247357] ? exc_page_fault+0x7e/0x180 > [ 1976.247363] ? asm_exc_page_fault+0x26/0x30 > [ 1976.247371] rcu_do_batch+0x1c6/0x560 > [ 1976.441610] EXT4-fs (nbd0): unable to read superblock > [ 1976.578818] ? rcu_do_batch+0x165/0x560 > [ 1976.578823] rcu_core+0x1b2/0x4b0 > [ 1976.578827] __do_softirq+0xd9/0x2c5 > [ 1976.578833] __irq_exit_rcu+0x95/0xb0 > [ 1976.582102] EXT4-fs (nbd0): unable to read superblock > [ 1976.582138] sysvec_apic_timer_interrupt+0x71/0x90 > [ 1976.583407] EXT4-fs (nbd0): unable to read superblock > [ 1976.583567] </IRQ> > [ 1976.583569] <TASK> > [ 1976.583570] asm_sysvec_apic_timer_interrupt+0x1a/0x20 > [ 1976.583575] RIP: 0010:cpuidle_enter_state+0xc6/0x420 > [ 1976.583578] Code: 00 00 e8 8d f5 13 ff e[ 1976.584827] RSP: > 0018:ffffb7974123fe98 EFLAGS: 00000246 > [ 1976.584830] RAX: ffff94d4b7900000 RBX: 0000000000000004 RCX: 0000000000000000 > [ 1976.584832] RDX: 000001cbfcef036a RSI: fffffe40b5d57332 RDI: 0000000000000000 > [ 1976.584833] RBP: ffff94d4b7941108 R08: 0000000000000002 R09: 0000000000000369 > [ 1976.584835] R10: 0000000000000018 R11: ffff94d4b79343e4 R12: ffffffffb7647220 > [ 1976.584837] R13: 000001cbfcef036a R14: 0000000000000004 R15: 0000000000000000 > [ 1976.584840] ? cpuidle_enter_state+0xb7/0x420 > [ 1976.584843] cpuidle_enter+0x2d/0x40 > [ 1976.585710] EXT4-fs (nbd0): unable to read superblock > [ 1976.585811] do_idle+0x1e5/0x240 > [ 1976.586621] EXT4-fs (nbd0): unable to read superblock > [ 1976.586825] cpu_startup_entry+0x28/0x30 > [ 1976.587568] EXT4-fs (nbd0): unable to read superblock > [ 1976.588147] start_secondary+0x11c/0x140 > [ 1976.588992] EXT4-fs (nbd0): unable to read superblock > [ 1976.589410] common_startup_64+0x13e/0x141 > [ 1976.590267] EXT4-fs (nbd0): unable to read superblock > [ 1976.956881] </TASK> > [ 1976.956882] Modules linked in: nbd nvme_keyring nvme_core nvme_auth > pktcdvd rfkill intel_rapl_msr intel_rapl_common sb_edac > x86_pkg_temp_thermal intel_powerclamp coretemp sunrpc kvm_intel > ipmi_ssif kvm rapl intel_cstate > [ 1[ 1977.094336] EXT4-fs (nbd0): unable to read superblock > [ 1977.094740] ipmi_si intel_pmc_bxt hpilo ipmi_devintf igb pcspkr > acpi_power_meter iTCO_vendor_support ioatdma lpc_ich ipmi_msghandler > dca fuse loop nfnetlink zram xfs crct10dif_pclmul crc32c_intel > polyval_clmulni polyval_generic ghash_clmulni_intel sha512_ssse3 > sha256_ssse3 sha1_ssse3 serio_raw mgag200 i2c_algo_bit hpwdt > [ 1977.095963] EXT4-fs (nbd0): unable to read superblock > [ 1977.096494] [last unloaded: crc32_pclmul] > [ 1977.097365] EXT4-fs (nbd0): unable to read superblock > [ 1977.097489] > [ 1977.097492] CR2: 0000000000000000 > [ 1977.098348] EXT4-fs (nbd0): unable to read superblock > [ 1977.098402] ---[ end trace 0000000000000000 ]--- > [ 1977.129544] EXT4-fs (nbd0): unable to read superblock > [ 1977.271906] ERST: [Firmware Warn]: Firmware does not respond in time. > [ 1977.348338] EXT4-fs (nbd0): unable to read superblock > [ 1977.491887] ERST: [Firmware Warn]: Firmware does not respond in time. > [ 1977.594276] EXT4-fs (nbd0): unable to read superblock > [ 1977.603176] ERST: [Firmware Warn]: Firmware does not respond in time. > [ 1977.604077] EXT4-fs (nbd0): unable to read superblock > [ 1977.607491] ERST: [Firmware Warn]: Firmware does not respond in time. > [ 1977.607773] EXT4-fs (nbd0): unable to read superblock > [ 1977.609318] EXT4-fs (nbd0):[ 1977.864344] Code: Unable to access > opcode bytes at 0xffffffffffffffd6. > [ 1977.864345] RSP: 0018:ffffb79741fc0eb8 EFLAGS: 00010282 > [ 1977.864348] RAX: 0000000000000001 RBX: 0000000000000003 RCX: 0000000000000000 > [ 1977.864349] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff94d18d952ce8 > [ 1977.864351] RBP: ffff94d2c0f95180 R08: 00000000000008f7 R09: 000000000000001a > [ 1977.864353] R10: 0000000062616c73 R11: 00000000616c7320 R12: ffff94d4b7937080 > [ 1977.864355] R13: ffffb79741fc0ef0 R14: 0000000000000002 R15: 0000000000000000 > [ 1977.864357] FS: 0000000000000000(0000) GS:ffff94d4b7900000(0000) > knlGS:0000000000000000 > [ 1977.864359] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [ 1977.864360] CR2: ffffffffffffffd6 CR3: 00000000b8422003 CR4: 00000000000606f0 > [ 1977.864363] Kernel panic - not syncing: Fatal exception in interrupt > [ 1977.864426] Kernel Offset: 0x34000000 from 0xffffffff81000000 > (relocation range: 0xffffffff80000000-0xffffffffbfffffff) > [ 1978.116728] ---[ end Kernel panic - not syncing: Fatal exception in > interrupt ]--- > > > -- > Best Regards, > Yi Zhang -- Best Regards, Yi Zhang
On 3/18/24 09:38, Yu Kuai wrote: > Hi, > > 在 2024/03/18 17:19, Jan Kara 写道: >> On Thu 22-02-24 20:45:53, Yu Kuai wrote: >>> From: Yu Kuai <yukuai3@huawei.com> >>> >>> Now that dm upper layer already statsh the file of opened device in >>> 'dm_dev->bdev_file', it's ok to get inode from the file. >>> >>> Signed-off-by: Yu Kuai <yukuai3@huawei.com> >> >> Given there are like three real uses of ->bdev in dm-vdo, I suspect it >> might be better to just replace bdev with bdev_file in struct io_factory >> and in struct uds_parameters. > > Yes, this make sense. > > Thanks for the review! > Kuai > At a glance this looks completely reasonable to me. However, can you be sure to CC: dm-devel@lists.linux.dev for dm-vdo patches? I almost missed seeing this patch. I will try to give it a proper review tomorrow. Matt >> >> Honza >> >>> --- >>> drivers/md/dm-vdo/dedupe.c | 3 ++- >>> drivers/md/dm-vdo/dm-vdo-target.c | 5 +++-- >>> drivers/md/dm-vdo/indexer/config.c | 1 + >>> drivers/md/dm-vdo/indexer/config.h | 3 +++ >>> drivers/md/dm-vdo/indexer/index-layout.c | 6 +++--- >>> drivers/md/dm-vdo/indexer/index-layout.h | 2 +- >>> drivers/md/dm-vdo/indexer/index-session.c | 13 +++++++------ >>> drivers/md/dm-vdo/indexer/index.c | 4 ++-- >>> drivers/md/dm-vdo/indexer/index.h | 2 +- >>> drivers/md/dm-vdo/indexer/indexer.h | 4 +++- >>> drivers/md/dm-vdo/indexer/io-factory.c | 13 ++++++++----- >>> drivers/md/dm-vdo/indexer/io-factory.h | 4 ++-- >>> drivers/md/dm-vdo/indexer/volume.c | 4 ++-- >>> drivers/md/dm-vdo/indexer/volume.h | 2 +- >>> 14 files changed, 39 insertions(+), 27 deletions(-) >>> >>> diff --git a/drivers/md/dm-vdo/dedupe.c b/drivers/md/dm-vdo/dedupe.c >>> index a9b189395592..532294a15174 100644 >>> --- a/drivers/md/dm-vdo/dedupe.c >>> +++ b/drivers/md/dm-vdo/dedupe.c >>> @@ -2592,7 +2592,8 @@ static void resume_index(void *context, struct >>> vdo_completion *parent) >>> int result; >>> zones->parameters.bdev = config->owned_device->bdev; >>> - result = uds_resume_index_session(zones->index_session, >>> zones->parameters.bdev); >>> + zones->parameters.bdev_file = config->owned_device->bdev_file; >>> + result = uds_resume_index_session(zones->index_session, >>> zones->parameters.bdev_file); >>> if (result != UDS_SUCCESS) >>> vdo_log_error_strerror(result, "Error resuming dedupe index"); >>> diff --git a/drivers/md/dm-vdo/dm-vdo-target.c >>> b/drivers/md/dm-vdo/dm-vdo-target.c >>> index 89d00be9f075..b2d7f68e70be 100644 >>> --- a/drivers/md/dm-vdo/dm-vdo-target.c >>> +++ b/drivers/md/dm-vdo/dm-vdo-target.c >>> @@ -883,7 +883,7 @@ static int parse_device_config(int argc, char >>> **argv, struct dm_target *ti, >>> } >>> if (config->version == 0) { >>> - u64 device_size = >>> i_size_read(config->owned_device->bdev->bd_inode); >>> + u64 device_size = >>> i_size_read(file_inode(config->owned_device->bdev_file)); >>> config->physical_blocks = device_size / VDO_BLOCK_SIZE; >>> } >>> @@ -1018,7 +1018,8 @@ static void vdo_status(struct dm_target *ti, >>> status_type_t status_type, >>> static block_count_t __must_check >>> get_underlying_device_block_count(const struct vdo *vdo) >>> { >>> - return i_size_read(vdo_get_backing_device(vdo)->bd_inode) / >>> VDO_BLOCK_SIZE; >>> + return >>> i_size_read(file_inode(vdo->device_config->owned_device->bdev_file)) / >>> + VDO_BLOCK_SIZE; >>> } >>> static int __must_check process_vdo_message_locked(struct vdo *vdo, >>> unsigned int argc, >>> diff --git a/drivers/md/dm-vdo/indexer/config.c >>> b/drivers/md/dm-vdo/indexer/config.c >>> index 260993ce1944..f1f66e232b54 100644 >>> --- a/drivers/md/dm-vdo/indexer/config.c >>> +++ b/drivers/md/dm-vdo/indexer/config.c >>> @@ -347,6 +347,7 @@ int uds_make_configuration(const struct >>> uds_parameters *params, >>> config->sparse_sample_rate = (params->sparse ? >>> DEFAULT_SPARSE_SAMPLE_RATE : 0); >>> config->nonce = params->nonce; >>> config->bdev = params->bdev; >>> + config->bdev_file = params->bdev_file; >>> config->offset = params->offset; >>> config->size = params->size; >>> diff --git a/drivers/md/dm-vdo/indexer/config.h >>> b/drivers/md/dm-vdo/indexer/config.h >>> index fe7958263ed6..688f7450183e 100644 >>> --- a/drivers/md/dm-vdo/indexer/config.h >>> +++ b/drivers/md/dm-vdo/indexer/config.h >>> @@ -28,6 +28,9 @@ struct uds_configuration { >>> /* Storage device for the index */ >>> struct block_device *bdev; >>> + /* Opened device fot the index */ >>> + struct file *bdev_file; >>> + >>> /* The maximum allowable size of the index */ >>> size_t size; >>> diff --git a/drivers/md/dm-vdo/indexer/index-layout.c >>> b/drivers/md/dm-vdo/indexer/index-layout.c >>> index 1453fddaa656..6dd80a432fe5 100644 >>> --- a/drivers/md/dm-vdo/indexer/index-layout.c >>> +++ b/drivers/md/dm-vdo/indexer/index-layout.c >>> @@ -1672,7 +1672,7 @@ static int create_layout_factory(struct >>> index_layout *layout, >>> size_t writable_size; >>> struct io_factory *factory = NULL; >>> - result = uds_make_io_factory(config->bdev, &factory); >>> + result = uds_make_io_factory(config->bdev_file, &factory); >>> if (result != UDS_SUCCESS) >>> return result; >>> @@ -1745,9 +1745,9 @@ void vdo_free_index_layout(struct index_layout >>> *layout) >>> } >>> int uds_replace_index_layout_storage(struct index_layout *layout, >>> - struct block_device *bdev) >>> + struct file *bdev_file) >>> { >>> - return uds_replace_storage(layout->factory, bdev); >>> + return uds_replace_storage(layout->factory, bdev_file); >>> } >>> /* Obtain a dm_bufio_client for the volume region. */ >>> diff --git a/drivers/md/dm-vdo/indexer/index-layout.h >>> b/drivers/md/dm-vdo/indexer/index-layout.h >>> index bd9b90c84a70..9b0c850fe9a7 100644 >>> --- a/drivers/md/dm-vdo/indexer/index-layout.h >>> +++ b/drivers/md/dm-vdo/indexer/index-layout.h >>> @@ -24,7 +24,7 @@ int __must_check uds_make_index_layout(struct >>> uds_configuration *config, bool ne >>> void vdo_free_index_layout(struct index_layout *layout); >>> int __must_check uds_replace_index_layout_storage(struct >>> index_layout *layout, >>> - struct block_device *bdev); >>> + struct file *bdev_file); >>> int __must_check uds_load_index_state(struct index_layout *layout, >>> struct uds_index *index); >>> diff --git a/drivers/md/dm-vdo/indexer/index-session.c >>> b/drivers/md/dm-vdo/indexer/index-session.c >>> index 1949a2598656..df8f8122a22d 100644 >>> --- a/drivers/md/dm-vdo/indexer/index-session.c >>> +++ b/drivers/md/dm-vdo/indexer/index-session.c >>> @@ -460,15 +460,16 @@ int uds_suspend_index_session(struct >>> uds_index_session *session, bool save) >>> return uds_status_to_errno(result); >>> } >>> -static int replace_device(struct uds_index_session *session, struct >>> block_device *bdev) >>> +static int replace_device(struct uds_index_session *session, struct >>> file *bdev_file) >>> { >>> int result; >>> - result = uds_replace_index_storage(session->index, bdev); >>> + result = uds_replace_index_storage(session->index, bdev_file); >>> if (result != UDS_SUCCESS) >>> return result; >>> - session->parameters.bdev = bdev; >>> + session->parameters.bdev = file_bdev(bdev_file); >>> + session->parameters.bdev_file = bdev_file; >>> return UDS_SUCCESS; >>> } >>> @@ -477,7 +478,7 @@ static int replace_device(struct >>> uds_index_session *session, struct block_device >>> * device differs from the current backing store, the index will >>> start using the new backing store. >>> */ >>> int uds_resume_index_session(struct uds_index_session *session, >>> - struct block_device *bdev) >>> + struct file *bdev_file) >>> { >>> int result = UDS_SUCCESS; >>> bool no_work = false; >>> @@ -502,8 +503,8 @@ int uds_resume_index_session(struct >>> uds_index_session *session, >>> if (no_work) >>> return result; >>> - if ((session->index != NULL) && (bdev != >>> session->parameters.bdev)) { >>> - result = replace_device(session, bdev); >>> + if ((session->index != NULL) && (bdev_file != >>> session->parameters.bdev_file)) { >>> + result = replace_device(session, bdev_file); >>> if (result != UDS_SUCCESS) { >>> mutex_lock(&session->request_mutex); >>> session->state &= ~IS_FLAG_WAITING; >>> diff --git a/drivers/md/dm-vdo/indexer/index.c >>> b/drivers/md/dm-vdo/indexer/index.c >>> index bd2405738c50..3600a169ca98 100644 >>> --- a/drivers/md/dm-vdo/indexer/index.c >>> +++ b/drivers/md/dm-vdo/indexer/index.c >>> @@ -1334,9 +1334,9 @@ int uds_save_index(struct uds_index *index) >>> return result; >>> } >>> -int uds_replace_index_storage(struct uds_index *index, struct >>> block_device *bdev) >>> +int uds_replace_index_storage(struct uds_index *index, struct file >>> *bdev_file) >>> { >>> - return uds_replace_volume_storage(index->volume, index->layout, >>> bdev); >>> + return uds_replace_volume_storage(index->volume, index->layout, >>> bdev_file); >>> } >>> /* Accessing statistics should be safe from any thread. */ >>> diff --git a/drivers/md/dm-vdo/indexer/index.h >>> b/drivers/md/dm-vdo/indexer/index.h >>> index 7fbc63db4131..9428ee025cda 100644 >>> --- a/drivers/md/dm-vdo/indexer/index.h >>> +++ b/drivers/md/dm-vdo/indexer/index.h >>> @@ -72,7 +72,7 @@ int __must_check uds_save_index(struct uds_index >>> *index); >>> void vdo_free_index(struct uds_index *index); >>> int __must_check uds_replace_index_storage(struct uds_index *index, >>> - struct block_device *bdev); >>> + struct file *bdev_file); >>> void uds_get_index_stats(struct uds_index *index, struct >>> uds_index_stats *counters); >>> diff --git a/drivers/md/dm-vdo/indexer/indexer.h >>> b/drivers/md/dm-vdo/indexer/indexer.h >>> index a832a34d9436..5dd2c93f12c2 100644 >>> --- a/drivers/md/dm-vdo/indexer/indexer.h >>> +++ b/drivers/md/dm-vdo/indexer/indexer.h >>> @@ -130,6 +130,8 @@ struct uds_volume_record { >>> struct uds_parameters { >>> /* The block_device used for storage */ >>> struct block_device *bdev; >>> + /* Then opened block_device */ >>> + struct file *bdev_file; >>> /* The maximum allowable size of the index on storage */ >>> size_t size; >>> /* The offset where the index should start */ >>> @@ -314,7 +316,7 @@ int __must_check uds_suspend_index_session(struct >>> uds_index_session *session, bo >>> * start using the new backing store instead. >>> */ >>> int __must_check uds_resume_index_session(struct uds_index_session >>> *session, >>> - struct block_device *bdev); >>> + struct file *bdev_file); >>> /* Wait until all outstanding index operations are complete. */ >>> int __must_check uds_flush_index_session(struct uds_index_session >>> *session); >>> diff --git a/drivers/md/dm-vdo/indexer/io-factory.c >>> b/drivers/md/dm-vdo/indexer/io-factory.c >>> index 61104d5ccd61..a855c3ac73bc 100644 >>> --- a/drivers/md/dm-vdo/indexer/io-factory.c >>> +++ b/drivers/md/dm-vdo/indexer/io-factory.c >>> @@ -23,6 +23,7 @@ >>> */ >>> struct io_factory { >>> struct block_device *bdev; >>> + struct file *bdev_file; >>> atomic_t ref_count; >>> }; >>> @@ -59,7 +60,7 @@ static void uds_get_io_factory(struct io_factory >>> *factory) >>> atomic_inc(&factory->ref_count); >>> } >>> -int uds_make_io_factory(struct block_device *bdev, struct io_factory >>> **factory_ptr) >>> +int uds_make_io_factory(struct file *bdev_file, struct io_factory >>> **factory_ptr) >>> { >>> int result; >>> struct io_factory *factory; >>> @@ -68,16 +69,18 @@ int uds_make_io_factory(struct block_device >>> *bdev, struct io_factory **factory_p >>> if (result != VDO_SUCCESS) >>> return result; >>> - factory->bdev = bdev; >>> + factory->bdev = file_bdev(bdev_file); >>> + factory->bdev_file = bdev_file; >>> atomic_set_release(&factory->ref_count, 1); >>> *factory_ptr = factory; >>> return UDS_SUCCESS; >>> } >>> -int uds_replace_storage(struct io_factory *factory, struct >>> block_device *bdev) >>> +int uds_replace_storage(struct io_factory *factory, struct file >>> *bdev_file) >>> { >>> - factory->bdev = bdev; >>> + factory->bdev = file_bdev(bdev_file); >>> + factory->bdev_file = bdev_file; >>> return UDS_SUCCESS; >>> } >>> @@ -90,7 +93,7 @@ void uds_put_io_factory(struct io_factory *factory) >>> size_t uds_get_writable_size(struct io_factory *factory) >>> { >>> - return i_size_read(factory->bdev->bd_inode); >>> + return i_size_read(file_inode(factory->bdev_file)); >>> } >>> /* Create a struct dm_bufio_client for an index region starting at >>> offset. */ >>> diff --git a/drivers/md/dm-vdo/indexer/io-factory.h >>> b/drivers/md/dm-vdo/indexer/io-factory.h >>> index 60749a9ff756..e5100ab57754 100644 >>> --- a/drivers/md/dm-vdo/indexer/io-factory.h >>> +++ b/drivers/md/dm-vdo/indexer/io-factory.h >>> @@ -24,11 +24,11 @@ enum { >>> SECTORS_PER_BLOCK = UDS_BLOCK_SIZE >> SECTOR_SHIFT, >>> }; >>> -int __must_check uds_make_io_factory(struct block_device *bdev, >>> +int __must_check uds_make_io_factory(struct file *bdev_file, >>> struct io_factory **factory_ptr); >>> int __must_check uds_replace_storage(struct io_factory *factory, >>> - struct block_device *bdev); >>> + struct file *bdev_file); >>> void uds_put_io_factory(struct io_factory *factory); >>> diff --git a/drivers/md/dm-vdo/indexer/volume.c >>> b/drivers/md/dm-vdo/indexer/volume.c >>> index 8b21ec93f3bc..a292840a83e3 100644 >>> --- a/drivers/md/dm-vdo/indexer/volume.c >>> +++ b/drivers/md/dm-vdo/indexer/volume.c >>> @@ -1467,12 +1467,12 @@ int uds_find_volume_chapter_boundaries(struct >>> volume *volume, u64 *lowest_vcn, >>> int __must_check uds_replace_volume_storage(struct volume *volume, >>> struct index_layout *layout, >>> - struct block_device *bdev) >>> + struct file *bdev_file) >>> { >>> int result; >>> u32 i; >>> - result = uds_replace_index_layout_storage(layout, bdev); >>> + result = uds_replace_index_layout_storage(layout, bdev_file); >>> if (result != UDS_SUCCESS) >>> return result; >>> diff --git a/drivers/md/dm-vdo/indexer/volume.h >>> b/drivers/md/dm-vdo/indexer/volume.h >>> index 7fdd44464db2..5861654d837e 100644 >>> --- a/drivers/md/dm-vdo/indexer/volume.h >>> +++ b/drivers/md/dm-vdo/indexer/volume.h >>> @@ -131,7 +131,7 @@ void vdo_free_volume(struct volume *volume); >>> int __must_check uds_replace_volume_storage(struct volume *volume, >>> struct index_layout *layout, >>> - struct block_device *bdev); >>> + struct file *bdev_file); >>> int __must_check uds_find_volume_chapter_boundaries(struct volume >>> *volume, >>> u64 *lowest_vcn, u64 *highest_vcn, >>> -- >>> 2.39.2 >>> > >
Hi, 在 2024/03/19 9:18, Yu Kuai 写道: > Hi, > > 在 2024/03/18 17:39, Christian Brauner 写道: >> On Sat, Mar 16, 2024 at 10:49:33AM +0800, Yu Kuai wrote: >>> Hi, Christian >>> >>> 在 2024/03/15 21:54, Christian Brauner 写道: >>>> On Fri, Mar 15, 2024 at 08:08:49PM +0800, Yu Kuai wrote: >>>>> Hi, Christian >>>>> Hi, Christoph >>>>> Hi, Jan >>>>> >>>>> Perhaps now is a good time to send a formal version of this set. >>>>> However, I'm not sure yet what branch should I rebase and send this >>>>> set. >>>>> Should I send to the vfs tree? >>>> >>>> Nearly all of it is in fs/ so I'd say yes. >>>> . >>> >>> I see that you just create a new branch vfs.fixes, perhaps can I rebase >>> this set against this branch? >> >> Please base it on vfs.super. I'll rebase it to v6.9-rc1 on Sunday. > > Okay, I just see that vfs.super doesn't contain commit > 1cdeac6da33f("btrfs: pass btrfs_device to btrfs_scratch_superblocks()"), > and you might need to fix the conflict at some point. And there is another problem, dm-vdo doesn't exist in vfs.super yet. Do you still want me to rebase here? Thanks, Kuai > > Thanks, > Kuai > >> . >> > > . >
From: Zhang Yi <yi.zhang@huawei.com> Current clone operation could be non-atomic if the destination of a file is beyond EOF, user could get a file with corrupted (zeroed) data on crash. The problem is about to pre-alloctions. If you write some data into a file [A, B) (the position letters are increased one by one), and xfs could pre-allocate some blocks, then we get a delayed extent [A, D). Then the writeback path allocate blocks and convert this delayed extent [A, C) since lack of enough contiguous physical blocks, so the extent [C, D) is still delayed. After that, both the in-memory and the on-disk file size are B. If we clone file range into [E, F) from another file, xfs_reflink_zero_posteof() would call iomap_zero_range() to zero out the range [B, E) beyond EOF and flush range. Since [C, D) is still a delayed extent, it will be zeroed and the file's in-memory && on-disk size will be updated to D after flushing and before doing the clone operation. This is wrong, because user can user can see the size change and read zeros in the middle of the clone operation. We need to keep the in-memory and on-disk size before the clone operation starts, so instead of writing zeroes through the page cache for delayed ranges beyond EOF, we convert these ranges to unwritten and invalidating any cached data over that range beyond EOF. Suggested-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> --- fs/xfs/xfs_iomap.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index ccf83e72d8ca..1a6d05830433 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c @@ -1035,6 +1035,24 @@ xfs_buffered_write_iomap_begin( } if (imap.br_startoff <= offset_fsb) { + /* + * For zeroing out delayed allocation extent, we trim it if + * it's partial beyonds EOF block, or convert it to unwritten + * extent if it's all beyonds EOF block. + */ + if ((flags & IOMAP_ZERO) && + isnullstartblock(imap.br_startblock)) { + xfs_fileoff_t eof_fsb = XFS_B_TO_FSB(mp, XFS_ISIZE(ip)); + + if (offset_fsb >= eof_fsb) + goto convert_delay; + if (end_fsb > eof_fsb) { + end_fsb = eof_fsb; + xfs_trim_extent(&imap, offset_fsb, + end_fsb - offset_fsb); + } + } + /* * For reflink files we may need a delalloc reservation when * overwriting shared extents. This includes zeroing of @@ -1158,6 +1176,17 @@ xfs_buffered_write_iomap_begin( xfs_iunlock(ip, lockmode); return xfs_bmbt_to_iomap(ip, iomap, &imap, flags, 0, seq); +convert_delay: + xfs_iunlock(ip, lockmode); + truncate_pagecache(inode, offset); + error = xfs_bmapi_convert_delalloc(ip, XFS_DATA_FORK, offset, + iomap, NULL); + if (error) + return error; + + trace_xfs_iomap_alloc(ip, offset, count, XFS_DATA_FORK, &imap); + return 0; + found_cow: seq = xfs_iomap_inode_sequence(ip, 0); if (imap.br_startoff <= offset_fsb) { -- 2.39.2
From: Zhang Yi <yi.zhang@huawei.com> Unsharing and zeroing can only happen within EOF, so there is never a need to perform posteof pagecache truncation if write begin fails, also partial write could never theoretically happened from iomap_write_end(), so remove both of them. Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> --- fs/iomap/buffered-io.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 093c4515b22a..7e32a204650b 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -786,7 +786,6 @@ static int iomap_write_begin(struct iomap_iter *iter, loff_t pos, out_unlock: __iomap_put_folio(iter, pos, 0, folio); - iomap_write_failed(iter->inode, pos, len); return status; } @@ -863,8 +862,6 @@ static size_t iomap_write_end(struct iomap_iter *iter, loff_t pos, size_t len, if (old_size < pos) pagecache_isize_extended(iter->inode, old_size, pos); - if (ret < len) - iomap_write_failed(iter->inode, pos + ret, len - ret); return ret; } @@ -912,8 +909,10 @@ static loff_t iomap_write_iter(struct iomap_iter *iter, struct iov_iter *i) } status = iomap_write_begin(iter, pos, bytes, &folio); - if (unlikely(status)) + if (unlikely(status)) { + iomap_write_failed(iter->inode, pos, bytes); break; + } if (iter->iomap.flags & IOMAP_F_STALE) break; @@ -927,6 +926,9 @@ static loff_t iomap_write_iter(struct iomap_iter *iter, struct iov_iter *i) copied = copy_folio_from_iter_atomic(folio, offset, bytes, i); status = iomap_write_end(iter, pos, bytes, copied, folio); + if (status < bytes) + iomap_write_failed(iter->inode, pos + status, + bytes - status); if (unlikely(copied != status)) iov_iter_revert(i, copied - status); -- 2.39.2
From: Zhang Yi <yi.zhang@huawei.com> Since xfs_bmapi_convert_delalloc() only attempts to allocate the entire delalloc extent and require multiple invocations to allocate the target offset. So xfs_convert_blocks() add a loop to do this job and we call it in the write back path, but xfs_convert_blocks() isn't a common helper. Let's do it in xfs_bmapi_convert_delalloc() and drop xfs_convert_blocks(), preparing for the post EOF delalloc blocks converting in the buffered write begin path. Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> --- fs/xfs/libxfs/xfs_bmap.c | 34 +++++++++++++++++++++++-- fs/xfs/xfs_aops.c | 54 +++++++++++----------------------------- 2 files changed, 46 insertions(+), 42 deletions(-) diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index 07dc35de8ce5..042e8d3ab0ba 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c @@ -4516,8 +4516,8 @@ xfs_bmapi_write( * invocations to allocate the target offset if a large enough physical extent * is not available. */ -int -xfs_bmapi_convert_delalloc( +static int +__xfs_bmapi_convert_delalloc( struct xfs_inode *ip, int whichfork, xfs_off_t offset, @@ -4648,6 +4648,36 @@ xfs_bmapi_convert_delalloc( return error; } +/* + * Pass in a dellalloc extent and convert it to real extents, return the real + * extent that maps offset_fsb in iomap. + */ +int +xfs_bmapi_convert_delalloc( + struct xfs_inode *ip, + int whichfork, + loff_t offset, + struct iomap *iomap, + unsigned int *seq) +{ + int error; + + /* + * Attempt to allocate whatever delalloc extent currently backs offset + * and put the result into iomap. Allocate in a loop because it may + * take several attempts to allocate real blocks for a contiguous + * delalloc extent if free space is sufficiently fragmented. + */ + do { + error = __xfs_bmapi_convert_delalloc(ip, whichfork, offset, + iomap, seq); + if (error) + return error; + } while (iomap->offset + iomap->length <= offset); + + return 0; +} + int xfs_bmapi_remap( struct xfs_trans *tp, diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 813f85156b0c..6479e0dac69d 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -233,45 +233,6 @@ xfs_imap_valid( return true; } -/* - * Pass in a dellalloc extent and convert it to real extents, return the real - * extent that maps offset_fsb in wpc->iomap. - * - * The current page is held locked so nothing could have removed the block - * backing offset_fsb, although it could have moved from the COW to the data - * fork by another thread. - */ -static int -xfs_convert_blocks( - struct iomap_writepage_ctx *wpc, - struct xfs_inode *ip, - int whichfork, - loff_t offset) -{ - int error; - unsigned *seq; - - if (whichfork == XFS_COW_FORK) - seq = &XFS_WPC(wpc)->cow_seq; - else - seq = &XFS_WPC(wpc)->data_seq; - - /* - * Attempt to allocate whatever delalloc extent currently backs offset - * and put the result into wpc->iomap. Allocate in a loop because it - * may take several attempts to allocate real blocks for a contiguous - * delalloc extent if free space is sufficiently fragmented. - */ - do { - error = xfs_bmapi_convert_delalloc(ip, whichfork, offset, - &wpc->iomap, seq); - if (error) - return error; - } while (wpc->iomap.offset + wpc->iomap.length <= offset); - - return 0; -} - static int xfs_map_blocks( struct iomap_writepage_ctx *wpc, @@ -289,6 +250,7 @@ xfs_map_blocks( struct xfs_iext_cursor icur; int retries = 0; int error = 0; + unsigned int *seq; if (xfs_is_shutdown(mp)) return -EIO; @@ -386,7 +348,19 @@ xfs_map_blocks( trace_xfs_map_blocks_found(ip, offset, count, whichfork, &imap); return 0; allocate_blocks: - error = xfs_convert_blocks(wpc, ip, whichfork, offset); + /* + * Convert a dellalloc extent to a real one. The current page is held + * locked so nothing could have removed the block backing offset_fsb, + * although it could have moved from the COW to the data fork by another + * thread. + */ + if (whichfork == XFS_COW_FORK) + seq = &XFS_WPC(wpc)->cow_seq; + else + seq = &XFS_WPC(wpc)->data_seq; + + error = xfs_bmapi_convert_delalloc(ip, whichfork, offset, + &wpc->iomap, seq); if (error) { /* * If we failed to find the extent in the COW fork we might have -- 2.39.2
From: Zhang Yi <yi.zhang@huawei.com> Commit 1aa91d9c9933 ("xfs: Add async buffered write support") replace xfs_ilock(XFS_ILOCK_EXCL) with xfs_ilock_for_iomap() when locking the writing inode, and a new variable lockmode is used to indicate the lock mode. Although the lockmode should always be XFS_ILOCK_EXCL, it's still better to use this variable instead of useing XFS_ILOCK_EXCL directly when unlocking the inode. Fixes: 1aa91d9c9933 ("xfs: Add async buffered write support") Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> --- fs/xfs/xfs_iomap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index 18c8f168b153..ccf83e72d8ca 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c @@ -1149,13 +1149,13 @@ xfs_buffered_write_iomap_begin( * them out if the write happens to fail. */ seq = xfs_iomap_inode_sequence(ip, IOMAP_F_NEW); - xfs_iunlock(ip, XFS_ILOCK_EXCL); + xfs_iunlock(ip, lockmode); trace_xfs_iomap_alloc(ip, offset, count, allocfork, &imap); return xfs_bmbt_to_iomap(ip, iomap, &imap, flags, IOMAP_F_NEW, seq); found_imap: seq = xfs_iomap_inode_sequence(ip, 0); - xfs_iunlock(ip, XFS_ILOCK_EXCL); + xfs_iunlock(ip, lockmode); return xfs_bmbt_to_iomap(ip, iomap, &imap, flags, 0, seq); found_cow: @@ -1165,17 +1165,17 @@ xfs_buffered_write_iomap_begin( if (error) goto out_unlock; seq = xfs_iomap_inode_sequence(ip, IOMAP_F_SHARED); - xfs_iunlock(ip, XFS_ILOCK_EXCL); + xfs_iunlock(ip, lockmode); return xfs_bmbt_to_iomap(ip, iomap, &cmap, flags, IOMAP_F_SHARED, seq); } xfs_trim_extent(&cmap, offset_fsb, imap.br_startoff - offset_fsb); - xfs_iunlock(ip, XFS_ILOCK_EXCL); + xfs_iunlock(ip, lockmode); return xfs_bmbt_to_iomap(ip, iomap, &cmap, flags, 0, seq); out_unlock: - xfs_iunlock(ip, XFS_ILOCK_EXCL); + xfs_iunlock(ip, lockmode); return error; } -- 2.39.2
From: Zhang Yi <yi.zhang@huawei.com> Increase i_size in iomap_zero_range() and iomap_unshare_iter() is not needed, the caller should handle it. Especially, when truncate partial block, we should not increase i_size beyond the new EOF here. It doesn't affect xfs and gfs2 now because they set the new file size after zero out, it doesn't matter that a transient increase in i_size, but it will affect ext4 because it set file size before truncate. So move the i_size updating logic to iomap_write_iter(). Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> --- fs/iomap/buffered-io.c | 50 +++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 7e32a204650b..e9112dc78d15 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -837,32 +837,13 @@ static size_t iomap_write_end(struct iomap_iter *iter, loff_t pos, size_t len, size_t copied, struct folio *folio) { const struct iomap *srcmap = iomap_iter_srcmap(iter); - loff_t old_size = iter->inode->i_size; - size_t ret; - - if (srcmap->type == IOMAP_INLINE) { - ret = iomap_write_end_inline(iter, folio, pos, copied); - } else if (srcmap->flags & IOMAP_F_BUFFER_HEAD) { - ret = block_write_end(NULL, iter->inode->i_mapping, pos, len, - copied, &folio->page, NULL); - } else { - ret = __iomap_write_end(iter->inode, pos, len, copied, folio); - } - - /* - * Update the in-memory inode size after copying the data into the page - * cache. It's up to the file system to write the updated size to disk, - * preferably after I/O completion so that no stale data is exposed. - */ - if (pos + ret > old_size) { - i_size_write(iter->inode, pos + ret); - iter->iomap.flags |= IOMAP_F_SIZE_CHANGED; - } - __iomap_put_folio(iter, pos, ret, folio); - if (old_size < pos) - pagecache_isize_extended(iter->inode, old_size, pos); - return ret; + if (srcmap->type == IOMAP_INLINE) + return iomap_write_end_inline(iter, folio, pos, copied); + if (srcmap->flags & IOMAP_F_BUFFER_HEAD) + return block_write_end(NULL, iter->inode->i_mapping, pos, len, + copied, &folio->page, NULL); + return __iomap_write_end(iter->inode, pos, len, copied, folio); } static loff_t iomap_write_iter(struct iomap_iter *iter, struct iov_iter *i) @@ -877,6 +858,7 @@ static loff_t iomap_write_iter(struct iomap_iter *iter, struct iov_iter *i) do { struct folio *folio; + loff_t old_size; size_t offset; /* Offset into folio */ size_t bytes; /* Bytes to write to folio */ size_t copied; /* Bytes copied from user */ @@ -926,6 +908,22 @@ static loff_t iomap_write_iter(struct iomap_iter *iter, struct iov_iter *i) copied = copy_folio_from_iter_atomic(folio, offset, bytes, i); status = iomap_write_end(iter, pos, bytes, copied, folio); + /* + * Update the in-memory inode size after copying the data into + * the page cache. It's up to the file system to write the + * updated size to disk, preferably after I/O completion so that + * no stale data is exposed. Only once that's done can we + * unlock and release the folio. + */ + old_size = iter->inode->i_size; + if (pos + status > old_size) { + i_size_write(iter->inode, pos + status); + iter->iomap.flags |= IOMAP_F_SIZE_CHANGED; + } + __iomap_put_folio(iter, pos, status, folio); + + if (old_size < pos) + pagecache_isize_extended(iter->inode, old_size, pos); if (status < bytes) iomap_write_failed(iter->inode, pos + status, bytes - status); @@ -1298,6 +1296,7 @@ static loff_t iomap_unshare_iter(struct iomap_iter *iter) bytes = folio_size(folio) - offset; bytes = iomap_write_end(iter, pos, bytes, bytes, folio); + __iomap_put_folio(iter, pos, bytes, folio); if (WARN_ON_ONCE(bytes == 0)) return -EIO; @@ -1362,6 +1361,7 @@ static loff_t iomap_zero_iter(struct iomap_iter *iter, bool *did_zero) folio_mark_accessed(folio); bytes = iomap_write_end(iter, pos, bytes, bytes, folio); + __iomap_put_folio(iter, pos, bytes, folio); if (WARN_ON_ONCE(bytes == 0)) return -EIO; -- 2.39.2
Hi, 在 2024/03/18 17:39, Christian Brauner 写道: > On Sat, Mar 16, 2024 at 10:49:33AM +0800, Yu Kuai wrote: >> Hi, Christian >> >> 在 2024/03/15 21:54, Christian Brauner 写道: >>> On Fri, Mar 15, 2024 at 08:08:49PM +0800, Yu Kuai wrote: >>>> Hi, Christian >>>> Hi, Christoph >>>> Hi, Jan >>>> >>>> Perhaps now is a good time to send a formal version of this set. >>>> However, I'm not sure yet what branch should I rebase and send this set. >>>> Should I send to the vfs tree? >>> >>> Nearly all of it is in fs/ so I'd say yes. >>> . >> >> I see that you just create a new branch vfs.fixes, perhaps can I rebase >> this set against this branch? > > Please base it on vfs.super. I'll rebase it to v6.9-rc1 on Sunday. Okay, I just see that vfs.super doesn't contain commit 1cdeac6da33f("btrfs: pass btrfs_device to btrfs_scratch_superblocks()"), and you might need to fix the conflict at some point. Thanks, Kuai > . >
From: Zhang Yi <yi.zhang@huawei.com> Allow callers to pass a NULLL seq argument if they don't care about the fork sequence number. Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> --- fs/xfs/libxfs/xfs_bmap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index f362345467fa..07dc35de8ce5 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c @@ -4574,7 +4574,8 @@ xfs_bmapi_convert_delalloc( if (!isnullstartblock(bma.got.br_startblock)) { xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags, xfs_iomap_inode_sequence(ip, flags)); - *seq = READ_ONCE(ifp->if_seq); + if (seq) + *seq = READ_ONCE(ifp->if_seq); goto out_trans_cancel; } @@ -4623,7 +4624,8 @@ xfs_bmapi_convert_delalloc( ASSERT(!isnullstartblock(bma.got.br_startblock)); xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags, xfs_iomap_inode_sequence(ip, flags)); - *seq = READ_ONCE(ifp->if_seq); + if (seq) + *seq = READ_ONCE(ifp->if_seq); if (whichfork == XFS_COW_FORK) xfs_refcount_alloc_cow_extent(tp, bma.blkno, bma.length); -- 2.39.2
在 2024/3/18 22:33, kernel test robot 写道: > tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > branch HEAD: 2e93f143ca010a5013528e1cfdc895f024fe8c21 Add linux-next specific files for 20240318 > > Error/Warning ids grouped by kconfigs: > > gcc_recent_errors > |-- arc-allmodconfig > | `-- fs-ubifs-journal.c:warning:expecting-prototype-for-wake_up_reservation().-Prototype-was-for-add_or_start_queue()-instead > |-- arc-allyesconfig > | `-- fs-ubifs-journal.c:warning:expecting-prototype-for-wake_up_reservation().-Prototype-was-for-add_or_start_queue()-instead > |-- arm-allmodconfig > | |-- arch-arm-mach-omap2-prm33xx.c:warning:expecting-prototype-for-am33xx_prm_global_warm_sw_reset().-Prototype-was-for-am33xx_prm_global_sw_reset()-instead > | |-- drivers-gpu-drm-amd-amdgpu-amdgpu_vcn.c:warning:.bin-directive-output-may-be-truncated-writing-bytes-into-a-region-of-size-between-and > | `-- fs-ubifs-journal.c:warning:expecting-prototype-for-wake_up_reservation().-Prototype-was-for-add_or_start_queue()-instead > |-- arm-allyesconfig > | |-- arch-arm-mach-omap2-prm33xx.c:warning:expecting-prototype-for-am33xx_prm_global_warm_sw_reset().-Prototype-was-for-am33xx_prm_global_sw_reset()-instead > | |-- drivers-gpu-drm-amd-amdgpu-amdgpu_vcn.c:warning:.bin-directive-output-may-be-truncated-writing-bytes-into-a-region-of-size-between-and > | `-- fs-ubifs-journal.c:warning:expecting-prototype-for-wake_up_reservation().-Prototype-was-for-add_or_start_queue()-instead > |-- arm64-defconfig > | `-- fs-ubifs-journal.c:warning:expecting-prototype-for-wake_up_reservation().-Prototype-was-for-add_or_start_queue()-instead > |-- csky-allmodconfig > | |-- drivers-gpu-drm-amd-amdgpu-amdgpu_vcn.c:warning:.bin-directive-output-may-be-truncated-writing-bytes-into-a-region-of-size-between-and > | `-- fs-ubifs-journal.c:warning:expecting-prototype-for-wake_up_reservation().-Prototype-was-for-add_or_start_queue()-instead > |-- csky-allyesconfig > | |-- drivers-gpu-drm-amd-amdgpu-amdgpu_vcn.c:warning:.bin-directive-output-may-be-truncated-writing-bytes-into-a-region-of-size-between-and > | `-- fs-ubifs-journal.c:warning:expecting-prototype-for-wake_up_reservation().-Prototype-was-for-add_or_start_queue()-instead Hi, Richard, I sent out the warning fix patch in https://patchwork.ozlabs.org/project/linux-mtd/patch/20240227024204.1080739-1-chengzhihao1@huawei.com/
From: Zhang Yi <yi.zhang@huawei.com> Since iomap_write_end() can never return a partial write length, the comperation between written, copied and bytes becomes useless, just merge them with the unwritten branch. Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> --- fs/iomap/buffered-io.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 004673ea8bc1..f2fb89056259 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -937,11 +937,6 @@ static loff_t iomap_write_iter(struct iomap_iter *iter, struct iov_iter *i) if (old_size < pos) pagecache_isize_extended(iter->inode, old_size, pos); - if (written < bytes) - iomap_write_failed(iter->inode, pos + written, - bytes - written); - if (unlikely(copied != written)) - iov_iter_revert(i, copied - written); cond_resched(); if (unlikely(written == 0)) { @@ -951,6 +946,9 @@ static loff_t iomap_write_iter(struct iomap_iter *iter, struct iov_iter *i) * halfway through, might be a race with munmap, * might be severe memory pressure. */ + iomap_write_failed(iter->inode, pos, bytes); + iov_iter_revert(i, copied); + if (chunk > PAGE_SIZE) chunk /= 2; if (copied) { -- 2.39.2
From: Zhang Yi <yi.zhang@huawei.com> For now, we can make sure iomap_write_end() always return 0 or copied bytes, so instead of return written bytes, convert to return a boolean to indicate the copied bytes have been written to the pagecache. Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> --- fs/iomap/buffered-io.c | 50 +++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 291648c61a32..004673ea8bc1 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -790,7 +790,7 @@ static int iomap_write_begin(struct iomap_iter *iter, loff_t pos, return status; } -static size_t __iomap_write_end(struct inode *inode, loff_t pos, size_t len, +static bool __iomap_write_end(struct inode *inode, loff_t pos, size_t len, size_t copied, struct folio *folio) { flush_dcache_folio(folio); @@ -807,14 +807,14 @@ static size_t __iomap_write_end(struct inode *inode, loff_t pos, size_t len, * redo the whole thing. */ if (unlikely(copied < len && !folio_test_uptodate(folio))) - return 0; + return false; iomap_set_range_uptodate(folio, offset_in_folio(folio, pos), len); iomap_set_range_dirty(folio, offset_in_folio(folio, pos), copied); filemap_dirty_folio(inode->i_mapping, folio); - return copied; + return true; } -static size_t iomap_write_end_inline(const struct iomap_iter *iter, +static void iomap_write_end_inline(const struct iomap_iter *iter, struct folio *folio, loff_t pos, size_t copied) { const struct iomap *iomap = &iter->iomap; @@ -829,21 +829,32 @@ static size_t iomap_write_end_inline(const struct iomap_iter *iter, kunmap_local(addr); mark_inode_dirty(iter->inode); - return copied; } -/* Returns the number of bytes copied. May be 0. Cannot be an errno. */ -static size_t iomap_write_end(struct iomap_iter *iter, loff_t pos, size_t len, +/* + * Returns true if all copied bytes have been written to the pagecache, + * otherwise return false. + */ +static bool iomap_write_end(struct iomap_iter *iter, loff_t pos, size_t len, size_t copied, struct folio *folio) { const struct iomap *srcmap = iomap_iter_srcmap(iter); + bool ret = true; - if (srcmap->type == IOMAP_INLINE) - return iomap_write_end_inline(iter, folio, pos, copied); - if (srcmap->flags & IOMAP_F_BUFFER_HEAD) - return block_write_end(NULL, iter->inode->i_mapping, pos, len, - copied, &folio->page, NULL); - return __iomap_write_end(iter->inode, pos, len, copied, folio); + if (srcmap->type == IOMAP_INLINE) { + iomap_write_end_inline(iter, folio, pos, copied); + } else if (srcmap->flags & IOMAP_F_BUFFER_HEAD) { + size_t bh_written; + + bh_written = block_write_end(NULL, iter->inode->i_mapping, pos, + len, copied, &folio->page, NULL); + WARN_ON_ONCE(bh_written != copied && bh_written != 0); + ret = bh_written == copied; + } else { + ret = __iomap_write_end(iter->inode, pos, len, copied, folio); + } + + return ret; } static loff_t iomap_write_iter(struct iomap_iter *iter, struct iov_iter *i) @@ -907,7 +918,8 @@ static loff_t iomap_write_iter(struct iomap_iter *iter, struct iov_iter *i) flush_dcache_folio(folio); copied = copy_folio_from_iter_atomic(folio, offset, bytes, i); - written = iomap_write_end(iter, pos, bytes, copied, folio); + written = iomap_write_end(iter, pos, bytes, copied, folio) ? + copied : 0; /* * Update the in-memory inode size after copying the data into @@ -1285,6 +1297,7 @@ static loff_t iomap_unshare_iter(struct iomap_iter *iter) int status; size_t offset; size_t bytes = min_t(u64, SIZE_MAX, length); + bool ret; status = iomap_write_begin(iter, pos, bytes, &folio); if (unlikely(status)) @@ -1296,9 +1309,9 @@ static loff_t iomap_unshare_iter(struct iomap_iter *iter) if (bytes > folio_size(folio) - offset) bytes = folio_size(folio) - offset; - bytes = iomap_write_end(iter, pos, bytes, bytes, folio); + ret = iomap_write_end(iter, pos, bytes, bytes, folio); __iomap_put_folio(iter, pos, bytes, folio); - if (WARN_ON_ONCE(bytes == 0)) + if (WARN_ON_ONCE(!ret)) return -EIO; cond_resched(); @@ -1347,6 +1360,7 @@ static loff_t iomap_zero_iter(struct iomap_iter *iter, bool *did_zero) int status; size_t offset; size_t bytes = min_t(u64, SIZE_MAX, length); + bool ret; status = iomap_write_begin(iter, pos, bytes, &folio); if (status) @@ -1361,9 +1375,9 @@ static loff_t iomap_zero_iter(struct iomap_iter *iter, bool *did_zero) folio_zero_range(folio, offset, bytes); folio_mark_accessed(folio); - bytes = iomap_write_end(iter, pos, bytes, bytes, folio); + ret = iomap_write_end(iter, pos, bytes, bytes, folio); __iomap_put_folio(iter, pos, bytes, folio); - if (WARN_ON_ONCE(bytes == 0)) + if (WARN_ON_ONCE(!ret)) return -EIO; pos += bytes; -- 2.39.2
From: Zhang Yi <yi.zhang@huawei.com> In iomap_write_iter(), the status variable used to receive the return value from iomap_write_end() is confusing, replace it with a new written variable to represent the written bytes in each cycle, no logic changes. Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> --- fs/iomap/buffered-io.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index e9112dc78d15..291648c61a32 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -851,7 +851,7 @@ static loff_t iomap_write_iter(struct iomap_iter *iter, struct iov_iter *i) loff_t length = iomap_length(iter); size_t chunk = PAGE_SIZE << MAX_PAGECACHE_ORDER; loff_t pos = iter->pos; - ssize_t written = 0; + ssize_t total_written = 0; long status = 0; struct address_space *mapping = iter->inode->i_mapping; unsigned int bdp_flags = (iter->flags & IOMAP_NOWAIT) ? BDP_ASYNC : 0; @@ -862,6 +862,7 @@ static loff_t iomap_write_iter(struct iomap_iter *iter, struct iov_iter *i) size_t offset; /* Offset into folio */ size_t bytes; /* Bytes to write to folio */ size_t copied; /* Bytes copied from user */ + size_t written; /* Bytes have been written */ bytes = iov_iter_count(i); retry: @@ -906,7 +907,7 @@ static loff_t iomap_write_iter(struct iomap_iter *iter, struct iov_iter *i) flush_dcache_folio(folio); copied = copy_folio_from_iter_atomic(folio, offset, bytes, i); - status = iomap_write_end(iter, pos, bytes, copied, folio); + written = iomap_write_end(iter, pos, bytes, copied, folio); /* * Update the in-memory inode size after copying the data into @@ -916,22 +917,22 @@ static loff_t iomap_write_iter(struct iomap_iter *iter, struct iov_iter *i) * unlock and release the folio. */ old_size = iter->inode->i_size; - if (pos + status > old_size) { - i_size_write(iter->inode, pos + status); + if (pos + written > old_size) { + i_size_write(iter->inode, pos + written); iter->iomap.flags |= IOMAP_F_SIZE_CHANGED; } - __iomap_put_folio(iter, pos, status, folio); + __iomap_put_folio(iter, pos, written, folio); if (old_size < pos) pagecache_isize_extended(iter->inode, old_size, pos); - if (status < bytes) - iomap_write_failed(iter->inode, pos + status, - bytes - status); - if (unlikely(copied != status)) - iov_iter_revert(i, copied - status); + if (written < bytes) + iomap_write_failed(iter->inode, pos + written, + bytes - written); + if (unlikely(copied != written)) + iov_iter_revert(i, copied - written); cond_resched(); - if (unlikely(status == 0)) { + if (unlikely(written == 0)) { /* * A short copy made iomap_write_end() reject the * thing entirely. Might be memory poisoning @@ -945,17 +946,17 @@ static loff_t iomap_write_iter(struct iomap_iter *iter, struct iov_iter *i) goto retry; } } else { - pos += status; - written += status; - length -= status; + pos += written; + total_written += written; + length -= written; } } while (iov_iter_count(i) && length); if (status == -EAGAIN) { - iov_iter_revert(i, written); + iov_iter_revert(i, total_written); return -EAGAIN; } - return written ? written : status; + return total_written ? total_written : status; } ssize_t -- 2.39.2
From: Zhang Yi <yi.zhang@huawei.com> Changes since v2: - Merge the patch for dropping of xfs_convert_blocks() and the patch for modifying xfs_bmapi_convert_delalloc(). - Reword the commit message of the second patch. Changes since v1: - Make xfs_bmapi_convert_delalloc() to allocate the target offset and drop the writeback helper xfs_convert_blocks(). - Don't use xfs_iomap_write_direct() to convert delalloc blocks for zeroing posteof case, use xfs_bmapi_convert_delalloc() instead. - Fix two off-by-one issues when converting delalloc blocks. - Add a separate patch to drop the buffered write failure handle in zeroing and unsharing. - Add a comments do emphasize updating i_size should under folio lock. - Make iomap_write_end() to return a boolean, and do some cleanups in buffered write begin path. This patch series fix a problem of exposing zeroed data on xfs since the non-atomic clone operation. This problem was found while I was developing ext4 buffered IO iomap conversion (ext4 is relying on this fix [1]), the root cause of this problem and the discussion about the solution please see [2]. After fix the problem, iomap_zero_range() doesn't need to update i_size so that ext4 can use it to zero partial block, e.g. truncate eof block [3]. [1] https://lore.kernel.org/linux-ext4/20240127015825.1608160-1-yi.zhang@huaweicloud.com/ [2] https://lore.kernel.org/linux-ext4/9b0040ef-3d9d-6246-4bdd-82b9a8f55fa2@huaweicloud.com/ [3] https://lore.kernel.org/linux-ext4/9c9f1831-a772-299b-072b-1c8116c3fb35@huaweicloud.com/ Thanks, Yi. Zhang Yi (9): xfs: match lock mode in xfs_buffered_write_iomap_begin() xfs: make the seq argument to xfs_bmapi_convert_delalloc() optional xfs: make xfs_bmapi_convert_delalloc() to allocate the target offset xfs: convert delayed extents to unwritten when zeroing post eof blocks iomap: drop the write failure handles when unsharing and zeroing iomap: don't increase i_size if it's not a write operation iomap: use a new variable to handle the written bytes in iomap_write_iter() iomap: make iomap_write_end() return a boolean iomap: do some small logical cleanup in buffered write fs/iomap/buffered-io.c | 101 ++++++++++++++++++++++----------------- fs/xfs/libxfs/xfs_bmap.c | 40 ++++++++++++++-- fs/xfs/xfs_aops.c | 54 ++++++--------------- fs/xfs/xfs_iomap.c | 39 +++++++++++++-- 4 files changed, 142 insertions(+), 92 deletions(-) -- 2.39.2
On Mon, Mar 18, 2024 at 11:29:17AM +0100, Christian Brauner wrote:
> Don't forget:
>
> mknod /my/xfs/file/system b 8 0
>
> which means you're not opening it via devtmpfs but via xfs. IOW, the
> inode for that file is from xfs.
Yes. file_inode() for block devices is always the "upper" fs, which can
be any file system supporting device nodes. file->f_mapping->host will
always be the bdevfs inode, and nothing in the I/O path should ever be
using file_inode().
On Mon, Mar 18, 2024 at 03:19:03PM +0800, Yu Kuai wrote:
> I come up with an ideal:
>
> While opening the block_device the first time, store the generated new
> file in "bd_inode->i_private". And release it after the last opener
> close the block_device.
>
> The advantages are:
> - multiple openers can share the same bdev_file;
> - raw block device ops can use the bdev_file as well, and there is no
> need to distinguish iomap/buffer_head for raw block_device;
>
> Please let me know what do you think?
That does sound very reasonable to me.
The pull request you sent on Mon, 18 Mar 2024 13:25:59 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl.git/ tags/sysctl-6.9-rc1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/2cb5c8683981ebd5033e3cc91f7dd75794f16e61 Thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html
On Mon, Mar 18, 2024 at 09:51:04PM +0000, Kiselev, Oleg wrote:
> On 3/15/24, 09:51, "Kent Overstreet" <kent.overstreet@linux.dev <mailto:kent.overstreet@linux.dev>> wrote:
> > On Fri, Mar 15, 2024 at 12:45:50PM -0400, Theodore Ts'o wrote:
> > > On Thu, Mar 14, 2024 at 11:53:02PM -0400, Kent Overstreet wrote:
> > > > the new sysfs path ioctl lets us get the /sys/fs/ path for a given
> > > > filesystem in a fs agnostic way, potentially nudging us towards
> > > > standarizing some of our reporting.
> > > >
> > > > --- a/fs/ext4/super.c
> > > > +++ b/fs/ext4/super.c
> > > > @@ -5346,6 +5346,7 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
> > > > sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP | QTYPE_MASK_PRJ;
> > > > #endif
> > > > super_set_uuid(sb, es->s_uuid, sizeof(es->s_uuid));
> > > > + super_set_sysfs_name_bdev(sb);
> > >
> > > Should we perhaps be hoisting this call up to the VFS layer, so that
> > > all file systems would benefit?
> >
> >
> > I did as much hoisting as I could. For some filesystems (single device
> > filesystems) the sysfs name is the block device, for the multi device
> > filesystems I've looked at it's the UUID.
>
> Why not use the fs UUID for all cases, single device and multi device?
Because the sysfs directory heirachy has already been defined for
many filesystems, and technically sysfs represents a KABI that we
can't just break for the hell of it.
e.g. changing everything to use uuid will break fstests
infrastructure because it assumes that it can derive the sysfs dir
location for the filesystem from the *device name* the filesystem is
mounted on. btrfs has a special implementation of that derivation
that runs the btrfs command to retreive the UUID of the filesysem.
So, yes, while we could technically change it, we break anything in
userspace that has introduced a dependency on bdev name as the sysfs
fs identifier. We're not going to break userspace like this,
especially as it is trivial to avoid.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
On Mon, Mar 18, 2024 at 02:48:51PM -0400, Gabriel Krisman Bertazi wrote: > Ritesh Harjani (IBM) <ritesh.list@gmail.com> writes: > > > Leah Rumancik <leah.rumancik@gmail.com> writes: > > > >> Last year we covered the new process for backporting to XFS. There are > >> still remaining pain points: establishing a baseline for new branches > >> is time consuming, testing resources aren't easy to come by for > >> everyone, and selecting appropriate patches is also time consuming. To > >> avoid the need to establish a baseline, I'm planning on converting to > >> a model in which I only run failed tests on the baseline. I test with > >> gce-xfstests and am hoping to automate a relaunch of failed tests. > >> Perhaps putting the logic to process the results and form new ./check > >> commands could live in fstests-dev in case it is useful for other > >> testing infrastructures. > > > > Nice idea. Another painpoint to add - > > 4k blocksize gets tested a lot but as soon as we switch to large block > > size testing, either with LBS, or on a system with larger pagesize... > > ...we quickly starts seeing problems. Most of them could be testcase > > failure, so if this could help establish a baseline, that might be helpful. > > > > > > Also if could collborate on exclude/known failures w.r.t different > > test configs that might come handy for people who are looking to help in > > this effort. In fact, why not have different filesystems cfg files and their > > corresponding exclude files as part of fstests repo itself? > > I know xfstests-bld maintains it here [1][2][3]. And it is rather > > very convinient to point this out to anyone who asks me of what test > > configs to test with or what tests are considered to be testcase > > failures bugs with a given fs config. > > > > So it will very helpful if we could have a mechanism such that all of > > this fs configs (and it's correspinding excludes) could be maintained in > > fstests itself, and anyone who is looking to test any fs config should > > be quickly be able to test it with ./check <fs_cfg_params>. Has this > > already been discussed before? Does this sound helpful for people who > > are looking to contribute in this effort of fs testing? Filesystem configs have already been implemented, yes? i.e. config file sections. We can do delta definitions like this in the config file: RECREATE_TEST_DEV=true TEST_MNT=/mnt/test TEST_DEV=/dev/vda SCRATCH_MNT=/mnt/scratch SCRATCH_DEV=/dev/vdb MKFS_OPTIONS= MOUNT_OPTIONS= [xfs_4k] MKFS_OPTIONS="-m rmapbt=1" [xfs_4k_quota] MKFS_OPTIONS="-m rmapbt=1" MOUNT_OPTIONS="-o uquota,gquota,pquota" [xfs_1k] MKFS_OPTIONS="-m rmapbt=1 -b size=1k" MOUNT_OPTIONS= [xfs_n64k] MKFS_OPTIONS="-m rmapbt=1 -n size=64k" .... And then simply run 'check -s xfs_n64k' or "-s xfs_4k_quota" or "-s xfs_1k", etc to run the tests against a pre-defined filesystem configuration. The actual per-system customised part of the config file is the initial device and mount definitions, all the fs config definitions are fixed and never really change. So we could ship a config file like the above as a template alongside config/example.config (e.g. example.xfs.config) and then the test environment setup can simply copy the file and use sed to rewrite the devices/mount points to match what it is going to use... IOWs, I think the fs config thing is already a solved problem, and we already have precedent for shipping example config files... As for excludes - unlike fs configs, these are not static across all test environments. They are entirely dependent on what kernel/userspace combination is being tested and the constraints the test running is executing under (e.g. runtime constraints). IOWs, every external test runner has a different set of tests that it will need to expunge... As it is, it would be trivial to add a config file section variable to define an expunge file for a given config section. That way the test running could keep it's own expunge files and add them to the relevant section when setting up the test VM environment, same as it would do for the devices and mounts. That way the expunge file isn't needed on the CLI, and so the test runner could just do 'check -s xfs_4k -s xfs_1k -s xfs_4k_quota" and get all those configs tested and have all the local expunges for the different configs just work.... > > [1] [ext4]: > > https://github.com/tytso/xfstests-bld/tree/master/test-appliance/files/root/fs/ext4/cfg > > Looking at the expunge comments, I think many of those entries should > just be turned into inline checks in the test preamble and skipped with > _notrun. This is the right thing to do - reduce the reliance on expunge files, and hence get rid of the need for them in most cases altogether. The best code is -no code-. > The way I see it, expunged tests should be kept to a minimum, > and the goal should be to eventually remove them from the list, IMO. > They are tests that are known to be broken or flaky now, and can be safely > ignored when doing unrelated work, but that will be fixed in the > future. Tests that will always fail because the feature doesn't exist in > the filesystem, or because it asks for an impossible situation in a > specific configuration should be checked inline and skipped, IMO. > +1 for the idea of having this in fstests. Even if we > lack the infrastructure to do anything useful with it in ./check, > having them in fstests will improve collaboration throughout > different fstests wrappers (kernelci, xfstests-bld, etc.) Except that this places the maintenance burden on fstests, in an environment where we can do -nothing- to validate the correctness of these lists, nor have any idea of when tests should or shouldn't be placed in these lists. i.e. If your test runner needs to expunge tests for some reason, either keep the expunge lists with the test runner, or add detection to the test that automatically _notrun()s the test in enviroments where it shouldn't be run.... I'd much prefer the improvement of _notrun detection over spreading the expunge file mess further into fstests. THis helps remove the technical debt (lack of proper checking in the test) rather than kicking it down the road for someone else to have to deal with in future. Centralisation of third party expunge file management is not the answer. We should be trying to reduce our reliance on expunges and the maintenance overhead they require, not driving that expunge file maintaintenance overhead into fstests itself... -Dave. -- Dave Chinner david@fromorbit.com
Christian Brauner <brauner@kernel.org> writes: > On Thu, Feb 15, 2024 at 09:16:36PM -0800, Vinicius Costa Gomes wrote: >> Fix the following warning when defining a cleanup guard for a "const" >> pointer type: >> >> ./include/linux/cleanup.h:211:18: warning: return discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] >> 211 | return _T->lock; \ >> | ~~^~~~~~ >> ./include/linux/cleanup.h:233:1: note: in expansion of macro ‘__DEFINE_UNLOCK_GUARD’ >> 233 | __DEFINE_UNLOCK_GUARD(_name, _type, _unlock, __VA_ARGS__) \ >> | ^~~~~~~~~~~~~~~~~~~~~ >> ./include/linux/cred.h:193:1: note: in expansion of macro ‘DEFINE_LOCK_GUARD_1’ >> 193 | DEFINE_LOCK_GUARD_1(cred, const struct cred, _T->lock = override_creds_light(_T->lock), >> | ^~~~~~~~~~~~~~~~~~~ >> >> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com> >> --- >> include/linux/cleanup.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/include/linux/cleanup.h b/include/linux/cleanup.h >> index c2d09bc4f976..085482ef46c8 100644 >> --- a/include/linux/cleanup.h >> +++ b/include/linux/cleanup.h >> @@ -208,7 +208,7 @@ static inline void class_##_name##_destructor(class_##_name##_t *_T) \ >> \ >> static inline void *class_##_name##_lock_ptr(class_##_name##_t *_T) \ >> { \ >> - return _T->lock; \ >> + return (void *)_T->lock; \ >> } > > I think both of these patches are a bit ugly as we burden the generic > cleanup code with casting to void which could cause actual issues. Fair point. > > Casting from const to non-const is rather specific to the cred code so I > would rather like to put the burden on the cred code instead of the > generic code if possible. For what it's worth, I liked your changes, will remove these two "fixes" from the series and use your suggestions in the next version. Thank you, -- Vinicius
On 3/15/24, 09:51, "Kent Overstreet" <kent.overstreet@linux.dev <mailto:kent.overstreet@linux.dev>> wrote:
> On Fri, Mar 15, 2024 at 12:45:50PM -0400, Theodore Ts'o wrote:
> > On Thu, Mar 14, 2024 at 11:53:02PM -0400, Kent Overstreet wrote:
> > > the new sysfs path ioctl lets us get the /sys/fs/ path for a given
> > > filesystem in a fs agnostic way, potentially nudging us towards
> > > standarizing some of our reporting.
> > >
> > > --- a/fs/ext4/super.c
> > > +++ b/fs/ext4/super.c
> > > @@ -5346,6 +5346,7 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
> > > sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP | QTYPE_MASK_PRJ;
> > > #endif
> > > super_set_uuid(sb, es->s_uuid, sizeof(es->s_uuid));
> > > + super_set_sysfs_name_bdev(sb);
> >
> > Should we perhaps be hoisting this call up to the VFS layer, so that
> > all file systems would benefit?
>
>
> I did as much hoisting as I could. For some filesystems (single device
> filesystems) the sysfs name is the block device, for the multi device
> filesystems I've looked at it's the UUID.
Why not use the fs UUID for all cases, single device and multi device?
--
Oleg Kiselev
please test uv in v9fs_evict_inode #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 360a5304ec03..5d046f63e5fa 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -353,7 +353,8 @@ void v9fs_evict_inode(struct inode *inode) filemap_fdatawrite(&inode->i_data); #ifdef CONFIG_9P_FSCACHE - fscache_relinquish_cookie(v9fs_inode_cookie(v9inode), false); + if (v9fs_inode_cookie(v9inode)) + fscache_relinquish_cookie(v9fs_inode_cookie(v9inode), false); #endif }