mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	btrfs: move struct btrfs_dio_private to inode.c
The btrfs_dio_private structure is only used in inode.c, so move the definition there. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
		
							parent
							
								
									acb8b52a15
								
							
						
					
					
						commit
						a3e171a09c
					
				
					 3 changed files with 24 additions and 25 deletions
				
			
		| 
						 | 
					@ -395,30 +395,6 @@ static inline bool btrfs_inode_can_compress(const struct btrfs_inode *inode)
 | 
				
			||||||
	return true;
 | 
						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;
 | 
					 | 
				
			||||||
	/* Used for bio::bi_size */
 | 
					 | 
				
			||||||
	u32 bytes;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
					 | 
				
			||||||
	 * References to this structure. There is one reference per in-flight
 | 
					 | 
				
			||||||
	 * bio plus one while we're still setting up.
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	refcount_t refs;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* dio_bio came from fs/direct-io.c */
 | 
					 | 
				
			||||||
	struct bio *dio_bio;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Array of checksums */
 | 
					 | 
				
			||||||
	u8 csums[];
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * btrfs_inode_item stores flags in a u64, btrfs_inode stores them in two
 | 
					 * btrfs_inode_item stores flags in a u64, btrfs_inode stores them in two
 | 
				
			||||||
 * separate u32s. These two functions convert between the two representations.
 | 
					 * separate u32s. These two functions convert between the two representations.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3218,7 +3218,6 @@ int btrfs_del_orphan_item(struct btrfs_trans_handle *trans,
 | 
				
			||||||
int btrfs_find_orphan_item(struct btrfs_root *root, u64 offset);
 | 
					int btrfs_find_orphan_item(struct btrfs_root *root, u64 offset);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* file-item.c */
 | 
					/* file-item.c */
 | 
				
			||||||
struct btrfs_dio_private;
 | 
					 | 
				
			||||||
int btrfs_del_csums(struct btrfs_trans_handle *trans,
 | 
					int btrfs_del_csums(struct btrfs_trans_handle *trans,
 | 
				
			||||||
		    struct btrfs_root *root, u64 bytenr, u64 len);
 | 
							    struct btrfs_root *root, u64 bytenr, u64 len);
 | 
				
			||||||
blk_status_t btrfs_lookup_bio_sums(struct inode *inode, struct bio *bio, u8 *dst);
 | 
					blk_status_t btrfs_lookup_bio_sums(struct inode *inode, struct bio *bio, u8 *dst);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -68,6 +68,30 @@ struct btrfs_dio_data {
 | 
				
			||||||
	bool nocow_done;
 | 
						bool nocow_done;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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;
 | 
				
			||||||
 | 
						/* Used for bio::bi_size */
 | 
				
			||||||
 | 
						u32 bytes;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/*
 | 
				
			||||||
 | 
						 * References to this structure. There is one reference per in-flight
 | 
				
			||||||
 | 
						 * bio plus one while we're still setting up.
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						refcount_t refs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* dio_bio came from fs/direct-io.c */
 | 
				
			||||||
 | 
						struct bio *dio_bio;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Array of checksums */
 | 
				
			||||||
 | 
						u8 csums[];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct btrfs_rename_ctx {
 | 
					struct btrfs_rename_ctx {
 | 
				
			||||||
	/* Output field. Stores the index number of the old directory entry. */
 | 
						/* Output field. Stores the index number of the old directory entry. */
 | 
				
			||||||
	u64 index;
 | 
						u64 index;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue