Re: [GIT PULL] Block updates for 6.11-rc1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 11 Jul 2024 at 22:44, Jens Axboe <axboe@xxxxxxxxx> wrote:
>
> Note the statx change for atomic writes will cause a trivial conflict
> with a patch that went into the 6.9 kernel via the vfs tree later than
> what the 6.11 block tree was based on. Easy to resolve, only mentioning
> it for completeness sake.

It may be easy to resolve, but as I was resolving it I threw up in my
mouth a little.

That whole

        struct inode *backing_inode;
        ...
        backing_inode = d_backing_inode(path.dentry);
        if (S_ISBLK(backing_inode->i_mode))
                bdev_statx(backing_inode, stat, request_mask);

does not belong in the generic stat helper. The whole *point* of
bdev_statx() is to not need that kind of bdev-specific knowledge.

So I rewrote it to be

        if (S_ISBLK(stat->mode))
                bdev_statx(path, stat, request_mask);

instead, and that whole "backing_inode" stuff is now inside bdev_statx().

Because wasn't that the whole point of abstracting this out, so that
block devices could do their own thing?

And if the backing inode is a special block device, but the "front"
inode doesn't say S_IFBLK, something is very screwed up.

But hey, maybe I screwed something up. But randomly having that whole
"d_backing_inode()" logic in there seemed entirely against the
abstraction layering.

            Linus




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux