Re: [PATCH 2/6] block: inline BDEV_I and friends

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

 



On Sat, Oct 09, 2021 at 01:25:39PM +0100, Pavel Begunkov wrote:
> I_BDEV and BDEV_I are very simple, they worth a single arith instruction
> or can even be almost completely compiled out. Inline them.

I see the benefit, but this is moving in the wrong direction.

struct bdev_inode is private to hide the struct inode.  Which at
the momen is a bit pointless given the bd_inode pointer in struct
block_device.

So we have two choices here that make sense:

 1) remove struct bdev_inode and kill the illusion that the inode
    is a private implementation detail
 2) remove direct references to bd_inode entirely.  Most of them are
    to i_size which already has proper helpers that should be used,
    and the rest can probably be covered with a handful wrappes or
    is bogus anyway



[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