Re: [PATCH 5/5] btrfs: allocate the btrfs_dio_private as part of the iomap dio bio

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

 





On 4.05.22 г. 19:23 ч., Christoph Hellwig wrote:
Create a new bio_set that contains all the per-bio private data needed
by btrfs for direct I/O and tell the iomap code to use that instead
of separately allocation the btrfs_dio_private structure.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
  fs/btrfs/btrfs_inode.h |  25 ----------
  fs/btrfs/ctree.h       |   1 -
  fs/btrfs/inode.c       | 108 ++++++++++++++++++++---------------------
  3 files changed, 53 insertions(+), 81 deletions(-)

diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h
index 32131a5d321b3..33811e896623f 100644
--- a/fs/btrfs/btrfs_inode.h
+++ b/fs/btrfs/btrfs_inode.h
@@ -395,31 +395,6 @@ static inline bool btrfs_inode_can_compress(const struct btrfs_inode *inode)
  	return true;
  }
-struct btrfs_dio_private {
-	struct inode *inode;
-
-	/*
-	 * Since DIO can use anonymous page, we cannot use page_offset() to
-	 * grab the file offset, thus need a dedicated member for file offset.
-	 */
-	u64 file_offset;
-	u64 disk_bytenr;

nit: You are actually removing this member when copying the struct, that's an independent change (albeit I'd say insignificant). Generally we prefer such changes to be in separate patches with rationale when the given member became redundant.

<snip>



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux