"block_device" structure removed from "bio"

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

 



Hi,

Greetings..!!

I'd like to report an issue which I've been facing in the new kernels (from 4.14 and newer).

Till kernel 4.13, we had the block_device structure as part of 

struct bio {
       struct bio           *bi_next;     /* request queue link */
       struct block_device *bi_bdev;
       unsigned int         bi_flags;     /* status, command, etc */
       int                  bi_error;
       unsigned long        bi_rw;        /* bottom bits READ/WRITE,
                                          * top bits priority
                                          */

>From kernel 4.14 onwards, this has been removed and I'm facing this error:
Error: "struct bio" has no member named "bi_bdev"

Code block (which gives this error):

dev_t block_device = bio->bi_bdev->bd_dev

As part of the driver code, I need to retrieve the "block_device" from the "bio" structure.
As per my understanding there is no existing API to do the same. Can you please let me know if there is any such API? If not, then can I expect any fix for the same in the future?

Regards,
Sarabjeet




[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