Skip to content

Commit dae1e52

Browse files
Amir Goldsteintytso
authored andcommitted
ext4: move ext4_ind_* functions from inode.c to indirect.c
This patch moves functions from inode.c to indirect.c. The moved functions are ext4_ind_* functions and their helpers. Functions called from inode.c are declared extern. Signed-off-by: Amir Goldstein <amir73il@users.sf.net> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
1 parent 9f125d6 commit dae1e52

5 files changed

Lines changed: 1521 additions & 1487 deletions

File tree

‎fs/ext4/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ obj-$(CONFIG_EXT4_FS) += ext4.o
77
ext4-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o page-io.o \
88
ioctl.o namei.o super.o symlink.o hash.o resize.o extents.o \
99
ext4_jbd2.o migrate.o mballoc.o block_validity.o move_extent.o \
10-
mmp.o
10+
mmp.o indirect.o
1111

1212
ext4-$(CONFIG_EXT4_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o
1313
ext4-$(CONFIG_EXT4_FS_POSIX_ACL) += acl.o

‎fs/ext4/block_validity.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,3 +266,4 @@ int ext4_check_blockref(const char *function, unsigned int line,
266266
}
267267
return 0;
268268
}
269+

‎fs/ext4/ext4.h‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,6 +1834,15 @@ extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf);
18341834
extern qsize_t *ext4_get_reserved_space(struct inode *inode);
18351835
extern void ext4_da_update_reserve_space(struct inode *inode,
18361836
int used, int quota_claim);
1837+
1838+
/* indirect.c */
1839+
extern int ext4_ind_map_blocks(handle_t *handle, struct inode *inode,
1840+
struct ext4_map_blocks *map, int flags);
1841+
extern ssize_t ext4_ind_direct_IO(int rw, struct kiocb *iocb,
1842+
const struct iovec *iov, loff_t offset,
1843+
unsigned long nr_segs);
1844+
extern int ext4_ind_calc_metadata_amount(struct inode *inode, sector_t lblock);
1845+
extern int ext4_ind_trans_blocks(struct inode *inode, int nrblocks, int chunk);
18371846
extern void ext4_ind_truncate(struct inode *inode);
18381847

18391848
/* ioctl.c */

0 commit comments

Comments
 (0)