1 commit 66153d87190a3547099446d222f36114d3eeffad
2 Author: Yang Sheng <ys@whamcloud.com>
3 AuthorDate: Tue Jan 24 03:31:27 2017 +0800
4 Subject: LU-9031 osd: handle jinode change for ldiskfs
6 We need to take care of jinode for ldiskfs. Since we
7 did not get the inode from syscall like sys_open(). So
8 we have to initialize it in OSD by ourselves.
10 Signed-off-by: Yang Sheng <yang.sheng@intel.com>
11 Change-Id: Iec6db290c3779a8f7c98e5d1356b71fd928d7c88
12 Reviewed-on: https://review.whamcloud.com/24941
13 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
14 Reviewed-by: Bob Glossman <bob.glossman@intel.com>
17 fs/ext4/inode.c | 9 ++++++++-
18 2 files changed, 9 insertions(+), 1 deletion(-)
20 Index: linux-4.15.0/fs/ext4/inode.c
21 ===================================================================
22 --- linux-4.15.0.orig/fs/ext4/inode.c
23 +++ linux-4.15.0/fs/ext4/inode.c
24 @@ -728,6 +728,9 @@ out_sem:
25 !(flags & EXT4_GET_BLOCKS_ZERO) &&
26 !ext4_is_quota_file(inode) &&
27 ext4_should_order_data(inode)) {
28 + ret = ext4_inode_attach_jinode(inode);
31 if (flags & EXT4_GET_BLOCKS_IO_SUBMIT)
32 ret = ext4_jbd2_inode_add_wait(handle, inode);
34 @@ -2806,6 +2809,9 @@ static int ext4_writepages(struct addres
35 mpd.last_page = wbc->range_end >> PAGE_SHIFT;
38 + ret = ext4_inode_attach_jinode(inode);
40 + goto out_writepages;
43 ext4_io_submit_init(&mpd.io_submit, wbc);
44 @@ -4356,6 +4362,7 @@ int ext4_inode_attach_jinode(struct inod
45 jbd2_free_inode(jinode);
48 +EXPORT_SYMBOL(ext4_inode_attach_jinode);
52 Index: linux-4.15.0/fs/ext4/ext4.h
53 ===================================================================
54 --- linux-4.15.0.orig/fs/ext4/ext4.h
55 +++ linux-4.15.0/fs/ext4/ext4.h
56 @@ -2595,6 +2595,7 @@ extern int ext4_trim_fs(struct super_blo
57 extern void ext4_process_freed_data(struct super_block *sb, tid_t commit_tid);
60 +#define HAVE_LDISKFS_INFO_JINODE
61 int ext4_inode_is_fast_symlink(struct inode *inode);
62 struct buffer_head *ext4_getblk(handle_t *, struct inode *, ext4_lblk_t, int);
63 struct buffer_head *ext4_bread(handle_t *, struct inode *, ext4_lblk_t, int);