linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Change in reported values of some block integrity sysfs attributes
@ 2024-12-13  7:16 M Nikhil
  2024-12-13 14:33 ` Christoph Hellwig
  2024-12-13 22:30 ` Martin K. Petersen
  0 siblings, 2 replies; 10+ messages in thread
From: M Nikhil @ 2024-12-13  7:16 UTC (permalink / raw)
  To: linux-block, dm-devel, linux-raid, nvdimm, linux-scsi, hare, hch
  Cc: steffen Maier, Benjamin Block, Nihar Panda

Hi Everyone,

  * We have observed change in the values of some of the block integrity
    sysfs attributes for the block devices on the master branch. The
    sysfs attributes related to block device integrity , write_generate
    and read_verify are  enabled for the block device when the parameter
    device_is_integrity_capable is disabled. This behaviour is seen on
    the scsi disks irrespective of DIF protection enabled or disabled on
    the disks.

    *Logs of the block integrity sysfs attributes for one of the block
    device:*

a3560030:~ # cat /sys/block/sda/integrity/write_generate

1

a3560030:~ # cat /sys/block/sda/integrity/read_verify

1

a3560030:~ # cat /sys/block/sda/integrity/device_is_integrity_capable

0

  * Similarly unexpected values of block integrity sysfs attributes are
    seen for multipath devices as well. Multipath device reporting value
    1 for device_is_integrity_capable even though it is based on SCSI
    disk devices, which all have 0 for device_is_integrity_capable.

a3560030:~ # cat /sys/block/dm-0/integrity/device_is_integrity_capable

1

a3560030:~ # cat /sys/block/dm-0/integrity/read_verify

1

a3560030:~ # cat /sys/block/dm-0/integrity/write_generate

1

  * Earlier the block integrity sysfs parameters "write_generate" and
    "read_verify" reported value 0 when the sysfs attribute
    device_is_integrity_capable was not set. But when tested with a
    recent upstream kernel, there is a change in the block device
    integrity sysfs attributes.
  * In the process of finding the kernel changes which might have caused
    the change in functionality, we have identified the below commit
    which was leading to the change in the sysfs attributes.
    9f4aa46f2a74 ("block: invert the BLK_INTEGRITY_{GENERATE,VERIFY} flags")
  * By reverting the code changes which are part of above commit and
    when tested the values of attributes read_verify and write_generate
    were set to 0 which was the older functionality.
   * From the description in the patch related to above commit, what we
    understand is that the changes are meant to invert the block
    integrity flags(READ_VERIFY and WRITE_GENERATE) vs the values in
    sysfs for making the user values persistent.
  * We would like to know if the change in the values of sysfs
    attributes write_generate and read_verify is expected?
  * And some additional information on in which scenario the attributes
    will be disabled or set to 0 and the affect of other block integrity
    attribute device_is_integrity_capable on attributes read_verify and
    write_generate.


Regards,

*M Nikhil
*

Software Engineer

ISDL, Bangalore, India

Linux on IBM Z and LinuxONE


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

end of thread, other threads:[~2025-02-25  1:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-13  7:16 Change in reported values of some block integrity sysfs attributes M Nikhil
2024-12-13 14:33 ` Christoph Hellwig
2024-12-17 12:46   ` M Nikhil
2024-12-13 22:30 ` Martin K. Petersen
2024-12-17 12:39   ` M Nikhil
2025-02-21  6:01     ` M Nikhil
2025-02-21 10:37   ` Anuj gupta
2025-02-21 10:35     ` Anuj Gupta
2025-02-21 12:07     ` Anuj Gupta
2025-02-25  1:07       ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).