Hi Christoph Hellwig,
Thank you for your comment.
> On Fri, Mar 25, 2022 at 03:00:55AM +0000, [email protected] wrote:
> > +#include <linux/blk_types.h>
>
> blk_types.h is not a header for public use. What do you want it for?
+ struct address_space *mapping = sb->s_bdev->bd_inode->i_mapping;
The type of 'sb->s_bdev' is 'struct block_device'.
I want to include the definition of 'struct block_device'('struct block_device' is defined in <linux/blk_types.h>).
Should I change to include <linux/blkdev.h>?
Best Regards,
Yuezhang Mo
On Fri, Mar 25, 2022 at 07:22:54AM +0000, [email protected] wrote:
> Hi Christoph Hellwig,
>
> Thank you for your comment.
>
> > On Fri, Mar 25, 2022 at 03:00:55AM +0000, [email protected] wrote:
> > > +#include <linux/blk_types.h>
> >
> > blk_types.h is not a header for public use. What do you want it for?
>
> + struct address_space *mapping = sb->s_bdev->bd_inode->i_mapping;
>
> The type of 'sb->s_bdev' is 'struct block_device'.
> I want to include the definition of 'struct block_device'('struct block_device' is defined in <linux/blk_types.h>).
Oh, I missed that. We really should not derefrence bd_inode in file
systems. So maybe we need to add a sync_blockdev_range abstraction if
we want to support this use case.