On 26 Sep 2024, at 2:35, Daniel Herman Shmulyan wrote: > Hello and Good day Hi Daniel, > My name is Daniel, I was experimenting with pNFS block layout, and > found 2 bugs in blkmap utility. > The source is here: https://git.linux-nfs.org/?p=steved/nfs-utils.git; > > I am not related to linux development community, so I am sending the > email directly, hopefully it reaches the right people > > Bug1: > Some block devices attach not directly under /dev/ but under sub dir > like /dev/nvmesh/ > Example: /dev/nvmesh/disk00 > under /proc/partitions: this disk appears as nvmesh/disk00, but under > /sys/block it appears as nvmesh!disk00. See Kernel function > kobject_set_name_vargs(). > blkmapd does not call it and fails to detect block devices under > subdir of /dev/ (because string matching of / and ! fails). > Result: pNFS cannot detect and do IO to disks which with 'lsblk' > appear under subdir. > > Bug2: > Due to support for old kernels blockmapd incorrectly detects the minor > version of a block device. It uses only 8 smallest bits for the minor > version. > This actually caused data corruption. > I have two block devices (major:minor) of 252:257 and 252:1, > The pNFS signature is found by blkmapd on disk 252:257 but pnfs IO > actually goes to disk 252:1 > > This is disastrous as some block device drivers deliberately reserve > lower bits for partitions of disks, Which causes this issue to be > critical. > one vendor actually used 8 lowest bits to support 256 partitions, > which means that his virtual disks are attached as (major:minor): > 252:0 > 252:256 > 252:512 ... > > And pNFS IO always goes to only to the first disk > > Thanks > > I am not familiar with the procedure of opening a bug report to the > kernel community, and I am very sorry if my direct Email is rude > etiquette. > I had the best intentions. We have https://bugzilla.linux-nfs.org/ for nfs-utils bug reporting, but also writing to the list about bugs is considered a good approach. I don't think there's been much work on blkmapd recently, so you might need to attempt to resolve these bugs on your own. If you're serious about using block-type NFS layouts, you might consider instead moving to SCSI layouts if you can, as they are a more robust way to identify devices and protect/fence. Additionally there's been work over the years to extend SCSI layouts to NVMe over fabric as well. TLDR - block layouts are moving away from needing blkmapd. Ben