aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/gfs2/dir.c1
-rw-r--r--fs/gfs2/inode.c3
-rw-r--r--fs/gfs2/ondisk.c6
-rw-r--r--fs/gfs2/ops_inode.c1
-rw-r--r--include/linux/gfs2_ondisk.h1
5 files changed, 4 insertions, 8 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index ca23c8beb3f0..c82d7cb4a654 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -902,7 +902,6 @@ static int dir_make_exhash(struct inode *inode)
902 dip->i_di.di_size = sdp->sd_sb.sb_bsize / 2; 902 dip->i_di.di_size = sdp->sd_sb.sb_bsize / 2;
903 dip->i_di.di_blocks++; 903 dip->i_di.di_blocks++;
904 dip->i_di.di_flags |= GFS2_DIF_EXHASH; 904 dip->i_di.di_flags |= GFS2_DIF_EXHASH;
905 dip->i_di.di_payload_format = 0;
906 905
907 for (x = sdp->sd_hash_ptrs, y = -1; x; x >>= 1, y++) ; 906 for (x = sdp->sd_hash_ptrs, y = -1; x; x >>= 1, y++) ;
908 dip->i_di.di_depth = y; 907 dip->i_di.di_depth = y;
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index c22ae3c3a444..f6177fc68320 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -210,7 +210,6 @@ static int gfs2_dinode_in(struct gfs2_inode *ip, const void *buf)
210 di->di_generation = be64_to_cpu(str->di_generation); 210 di->di_generation = be64_to_cpu(str->di_generation);
211 211
212 di->di_flags = be32_to_cpu(str->di_flags); 212 di->di_flags = be32_to_cpu(str->di_flags);
213 di->di_payload_format = be32_to_cpu(str->di_payload_format);
214 di->di_height = be16_to_cpu(str->di_height); 213 di->di_height = be16_to_cpu(str->di_height);
215 214
216 di->di_depth = be16_to_cpu(str->di_depth); 215 di->di_depth = be16_to_cpu(str->di_depth);
@@ -699,7 +698,7 @@ static void init_dinode(struct gfs2_inode *dip, struct gfs2_glock *gl,
699 } 698 }
700 699
701 di->__pad1 = 0; 700 di->__pad1 = 0;
702 di->di_payload_format = cpu_to_be32(0); 701 di->di_payload_format = cpu_to_be32(S_ISDIR(mode) ? GFS2_FORMAT_DE : 0);
703 di->di_height = cpu_to_be32(0); 702 di->di_height = cpu_to_be32(0);
704 di->__pad2 = 0; 703 di->__pad2 = 0;
705 di->__pad3 = 0; 704 di->__pad3 = 0;
diff --git a/fs/gfs2/ondisk.c b/fs/gfs2/ondisk.c
index 82003e872a37..b2baba5c50b7 100644
--- a/fs/gfs2/ondisk.c
+++ b/fs/gfs2/ondisk.c
@@ -176,9 +176,10 @@ void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf)
176 str->di_generation = cpu_to_be64(di->di_generation); 176 str->di_generation = cpu_to_be64(di->di_generation);
177 177
178 str->di_flags = cpu_to_be32(di->di_flags); 178 str->di_flags = cpu_to_be32(di->di_flags);
179 str->di_payload_format = cpu_to_be32(di->di_payload_format);
180 str->di_height = cpu_to_be16(di->di_height); 179 str->di_height = cpu_to_be16(di->di_height);
181 180 str->di_payload_format = cpu_to_be32(S_ISDIR(ip->i_inode.i_mode) &&
181 !(ip->i_di.di_flags & GFS2_DIF_EXHASH) ?
182 GFS2_FORMAT_DE : 0);
182 str->di_depth = cpu_to_be16(di->di_depth); 183 str->di_depth = cpu_to_be16(di->di_depth);
183 str->di_entries = cpu_to_be32(di->di_entries); 184 str->di_entries = cpu_to_be32(di->di_entries);
184 185
@@ -197,7 +198,6 @@ void gfs2_dinode_print(const struct gfs2_inode *ip)
197 printk(KERN_INFO " di_goal_data = %llu\n", (unsigned long long)di->di_goal_data); 198 printk(KERN_INFO " di_goal_data = %llu\n", (unsigned long long)di->di_goal_data);
198 199
199 pv(di, di_flags, "0x%.8X"); 200 pv(di, di_flags, "0x%.8X");
200 pv(di, di_payload_format, "%u");
201 pv(di, di_height, "%u"); 201 pv(di, di_height, "%u");
202 202
203 pv(di, di_depth, "%u"); 203 pv(di, di_depth, "%u");
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c
index 585b43a94ace..0e4eade47bf2 100644
--- a/fs/gfs2/ops_inode.c
+++ b/fs/gfs2/ops_inode.c
@@ -389,7 +389,6 @@ static int gfs2_mkdir(struct inode *dir, struct dentry *dentry, int mode)
389 ip->i_inode.i_nlink = 2; 389 ip->i_inode.i_nlink = 2;
390 ip->i_di.di_size = sdp->sd_sb.sb_bsize - sizeof(struct gfs2_dinode); 390 ip->i_di.di_size = sdp->sd_sb.sb_bsize - sizeof(struct gfs2_dinode);
391 ip->i_di.di_flags |= GFS2_DIF_JDATA; 391 ip->i_di.di_flags |= GFS2_DIF_JDATA;
392 ip->i_di.di_payload_format = GFS2_FORMAT_DE;
393 ip->i_di.di_entries = 2; 392 ip->i_di.di_entries = 2;
394 393
395 error = gfs2_meta_inode_buffer(ip, &dibh); 394 error = gfs2_meta_inode_buffer(ip, &dibh);
diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h
index 7f5a4a16224b..536575efb62a 100644
--- a/include/linux/gfs2_ondisk.h
+++ b/include/linux/gfs2_ondisk.h
@@ -333,7 +333,6 @@ struct gfs2_dinode_host {
333 __u64 di_generation; /* generation number for NFS */ 333 __u64 di_generation; /* generation number for NFS */
334 334
335 __u32 di_flags; /* GFS2_DIF_... */ 335 __u32 di_flags; /* GFS2_DIF_... */
336 __u32 di_payload_format; /* GFS2_FORMAT_... */
337 __u16 di_height; /* height of metadata */ 336 __u16 di_height; /* height of metadata */
338 337
339 /* These only apply to directories */ 338 /* These only apply to directories */