All of lore.kernel.org
 help / color / mirror / Atom feed
* Errors in log with WRITE_ZEROES over loop on NFS
@ 2022-07-27 13:01 Milan Broz
  2022-07-27 21:37 ` Chaitanya Kulkarni
  0 siblings, 1 reply; 3+ messages in thread
From: Milan Broz @ 2022-07-27 13:01 UTC (permalink / raw)
  To: linux-block; +Cc: Ondrej Kozina

Hi,

We switched to using BLKZEROOUT ioctl in libcryptsetup, and now we see a lot of messages like

  : operation not supported error, dev loop1, sector 0 op 0x9:(WRITE_ZEROES) flags 0x8000800 phys_seg 0 prio class 0

But the operation succeeds (ioctl returns 0).

As it seems, this happens when a loop device is allocated over a file on NFS mounted directory.
Easy to reproduce (5.19-rc8) by doing this in NFS mounted dir:

  # truncate -s 1M test.img
  # losetup /dev/loop1 test.img
  # fallocate -zn -l 1048576 /dev/loop1


Shouldn't the block layer be quiet here and just switch to a different wipe method?
(I think it happens in other cases.)

It is perhaps just a benign message, but it can trigger some reports.

Milan


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Errors in log with WRITE_ZEROES over loop on NFS
  2022-07-27 13:01 Errors in log with WRITE_ZEROES over loop on NFS Milan Broz
@ 2022-07-27 21:37 ` Chaitanya Kulkarni
  2022-07-28 11:48   ` Milan Broz
  0 siblings, 1 reply; 3+ messages in thread
From: Chaitanya Kulkarni @ 2022-07-27 21:37 UTC (permalink / raw)
  To: Milan Broz; +Cc: Ondrej Kozina, linux-block

On 7/27/22 06:01, Milan Broz wrote:
> Hi,
> 
> We switched to using BLKZEROOUT ioctl in libcryptsetup, and now we see a 
> lot of messages like
> 
>   : operation not supported error, dev loop1, sector 0 op 
> 0x9:(WRITE_ZEROES) flags 0x8000800 phys_seg 0 prio class 0
> 
> But the operation succeeds (ioctl returns 0).
> 
> As it seems, this happens when a loop device is allocated over a file on 
> NFS mounted directory.
> Easy to reproduce (5.19-rc8) by doing this in NFS mounted dir:
> 
>   # truncate -s 1M test.img
>   # losetup /dev/loop1 test.img
>   # fallocate -zn -l 1048576 /dev/loop1
> 
> 
> Shouldn't the block layer be quiet here and just switch to a different 
> wipe method?
> (I think it happens in other cases.)

without having all the setup details when underlying controller
advertises the it does support write-zeroes and then when
actual command fails you should this message.

In case device doesn't support the write-zeroes then block layer
silently executes the emulation path that REQ_OP_WRITE with
zeored out pages.

> 
> It is perhaps just a benign message, but it can trigger some reports.
> 
> Milan
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Errors in log with WRITE_ZEROES over loop on NFS
  2022-07-27 21:37 ` Chaitanya Kulkarni
@ 2022-07-28 11:48   ` Milan Broz
  0 siblings, 0 replies; 3+ messages in thread
From: Milan Broz @ 2022-07-28 11:48 UTC (permalink / raw)
  To: Chaitanya Kulkarni; +Cc: Ondrej Kozina, linux-block

On 27/07/2022 23:37, Chaitanya Kulkarni wrote:
> On 7/27/22 06:01, Milan Broz wrote:
>> Hi,
>>
>> We switched to using BLKZEROOUT ioctl in libcryptsetup, and now we see a
>> lot of messages like
>>
>>    : operation not supported error, dev loop1, sector 0 op
>> 0x9:(WRITE_ZEROES) flags 0x8000800 phys_seg 0 prio class 0
>>
>> But the operation succeeds (ioctl returns 0).
>>
>> As it seems, this happens when a loop device is allocated over a file on
>> NFS mounted directory.
>> Easy to reproduce (5.19-rc8) by doing this in NFS mounted dir:
>>
>>    # truncate -s 1M test.img
>>    # losetup /dev/loop1 test.img
>>    # fallocate -zn -l 1048576 /dev/loop1
>>
>>
>> Shouldn't the block layer be quiet here and just switch to a different
>> wipe method?
>> (I think it happens in other cases.)
> 
> without having all the setup details when underlying controller
> advertises the it does support write-zeroes and then when
> actual command fails you should this message.

This is a different case. There is no HW in between.
It is just NFS exported dir. On host system it works, on guest where
the dir is mounted it prints that warning.
  
> In case device doesn't support the write-zeroes then block layer
> silently executes the emulation path that REQ_OP_WRITE with
> zeored out pages.

I know, the point was that it is confusing if the error is printed
while the fallback actually works as expected.

Thanks,
Milan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-28 11:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27 13:01 Errors in log with WRITE_ZEROES over loop on NFS Milan Broz
2022-07-27 21:37 ` Chaitanya Kulkarni
2022-07-28 11:48   ` Milan Broz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.