diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2008-07-10 11:09:29 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2008-07-10 11:09:29 -0400 |
commit | c9f6a6bbc284ba87337876086f7e2e6e0b0d50dd (patch) | |
tree | 68930f47e91f82ca41b3a9f35fd118d2ff11d891 /fs/gfs2 | |
parent | 9cabcdbd4638cf884839ee4cd15780800c223b90 (diff) |
[GFS2] Remove support for unused and pointless flag
The ability to mark files for direct i/o access when opened
normally is both unused and pointless, so this patch removes
support for that feature.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/incore.h | 1 | ||||
-rw-r--r-- | fs/gfs2/inode.c | 5 | ||||
-rw-r--r-- | fs/gfs2/ops_file.c | 19 | ||||
-rw-r--r-- | fs/gfs2/super.c | 1 | ||||
-rw-r--r-- | fs/gfs2/sys.c | 2 |
5 files changed, 2 insertions, 26 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 4ab3c3a4a96..448697a5c46 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h | |||
@@ -421,7 +421,6 @@ struct gfs2_tune { | |||
421 | unsigned int gt_quota_quantum; /* Secs between syncs to quota file */ | 421 | unsigned int gt_quota_quantum; /* Secs between syncs to quota file */ |
422 | unsigned int gt_atime_quantum; /* Min secs between atime updates */ | 422 | unsigned int gt_atime_quantum; /* Min secs between atime updates */ |
423 | unsigned int gt_new_files_jdata; | 423 | unsigned int gt_new_files_jdata; |
424 | unsigned int gt_new_files_directio; | ||
425 | unsigned int gt_max_readahead; /* Max bytes to read-ahead from disk */ | 424 | unsigned int gt_max_readahead; /* Max bytes to read-ahead from disk */ |
426 | unsigned int gt_stall_secs; /* Detects trouble! */ | 425 | unsigned int gt_stall_secs; /* Detects trouble! */ |
427 | unsigned int gt_complain_secs; | 426 | unsigned int gt_complain_secs; |
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index caf40908335..6da0ab355b8 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -789,13 +789,8 @@ static void init_dinode(struct gfs2_inode *dip, struct gfs2_glock *gl, | |||
789 | if ((dip->i_di.di_flags & GFS2_DIF_INHERIT_JDATA) || | 789 | if ((dip->i_di.di_flags & GFS2_DIF_INHERIT_JDATA) || |
790 | gfs2_tune_get(sdp, gt_new_files_jdata)) | 790 | gfs2_tune_get(sdp, gt_new_files_jdata)) |
791 | di->di_flags |= cpu_to_be32(GFS2_DIF_JDATA); | 791 | di->di_flags |= cpu_to_be32(GFS2_DIF_JDATA); |
792 | if ((dip->i_di.di_flags & GFS2_DIF_INHERIT_DIRECTIO) || | ||
793 | gfs2_tune_get(sdp, gt_new_files_directio)) | ||
794 | di->di_flags |= cpu_to_be32(GFS2_DIF_DIRECTIO); | ||
795 | } else if (S_ISDIR(mode)) { | 792 | } else if (S_ISDIR(mode)) { |
796 | di->di_flags |= cpu_to_be32(dip->i_di.di_flags & | 793 | di->di_flags |= cpu_to_be32(dip->i_di.di_flags & |
797 | GFS2_DIF_INHERIT_DIRECTIO); | ||
798 | di->di_flags |= cpu_to_be32(dip->i_di.di_flags & | ||
799 | GFS2_DIF_INHERIT_JDATA); | 794 | GFS2_DIF_INHERIT_JDATA); |
800 | } | 795 | } |
801 | 796 | ||
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c index 1737af98a42..21b397d0a29 100644 --- a/fs/gfs2/ops_file.c +++ b/fs/gfs2/ops_file.c | |||
@@ -134,7 +134,6 @@ static const u32 fsflags_to_gfs2[32] = { | |||
134 | [7] = GFS2_DIF_NOATIME, | 134 | [7] = GFS2_DIF_NOATIME, |
135 | [12] = GFS2_DIF_EXHASH, | 135 | [12] = GFS2_DIF_EXHASH, |
136 | [14] = GFS2_DIF_INHERIT_JDATA, | 136 | [14] = GFS2_DIF_INHERIT_JDATA, |
137 | [20] = GFS2_DIF_INHERIT_DIRECTIO, | ||
138 | }; | 137 | }; |
139 | 138 | ||
140 | static const u32 gfs2_to_fsflags[32] = { | 139 | static const u32 gfs2_to_fsflags[32] = { |
@@ -143,7 +142,6 @@ static const u32 gfs2_to_fsflags[32] = { | |||
143 | [gfs2fl_AppendOnly] = FS_APPEND_FL, | 142 | [gfs2fl_AppendOnly] = FS_APPEND_FL, |
144 | [gfs2fl_NoAtime] = FS_NOATIME_FL, | 143 | [gfs2fl_NoAtime] = FS_NOATIME_FL, |
145 | [gfs2fl_ExHash] = FS_INDEX_FL, | 144 | [gfs2fl_ExHash] = FS_INDEX_FL, |
146 | [gfs2fl_InheritDirectio] = FS_DIRECTIO_FL, | ||
147 | [gfs2fl_InheritJdata] = FS_JOURNAL_DATA_FL, | 145 | [gfs2fl_InheritJdata] = FS_JOURNAL_DATA_FL, |
148 | }; | 146 | }; |
149 | 147 | ||
@@ -161,12 +159,8 @@ static int gfs2_get_flags(struct file *filp, u32 __user *ptr) | |||
161 | return error; | 159 | return error; |
162 | 160 | ||
163 | fsflags = fsflags_cvt(gfs2_to_fsflags, ip->i_di.di_flags); | 161 | fsflags = fsflags_cvt(gfs2_to_fsflags, ip->i_di.di_flags); |
164 | if (!S_ISDIR(inode->i_mode)) { | 162 | if (!S_ISDIR(inode->i_mode) && ip->i_di.di_flags & GFS2_DIF_JDATA) |
165 | if (ip->i_di.di_flags & GFS2_DIF_JDATA) | 163 | fsflags |= FS_JOURNAL_DATA_FL; |
166 | fsflags |= FS_JOURNAL_DATA_FL; | ||
167 | if (ip->i_di.di_flags & GFS2_DIF_DIRECTIO) | ||
168 | fsflags |= FS_DIRECTIO_FL; | ||
169 | } | ||
170 | if (put_user(fsflags, ptr)) | 164 | if (put_user(fsflags, ptr)) |
171 | error = -EFAULT; | 165 | error = -EFAULT; |
172 | 166 | ||
@@ -195,13 +189,11 @@ void gfs2_set_inode_flags(struct inode *inode) | |||
195 | 189 | ||
196 | /* Flags that can be set by user space */ | 190 | /* Flags that can be set by user space */ |
197 | #define GFS2_FLAGS_USER_SET (GFS2_DIF_JDATA| \ | 191 | #define GFS2_FLAGS_USER_SET (GFS2_DIF_JDATA| \ |
198 | GFS2_DIF_DIRECTIO| \ | ||
199 | GFS2_DIF_IMMUTABLE| \ | 192 | GFS2_DIF_IMMUTABLE| \ |
200 | GFS2_DIF_APPENDONLY| \ | 193 | GFS2_DIF_APPENDONLY| \ |
201 | GFS2_DIF_NOATIME| \ | 194 | GFS2_DIF_NOATIME| \ |
202 | GFS2_DIF_SYNC| \ | 195 | GFS2_DIF_SYNC| \ |
203 | GFS2_DIF_SYSTEM| \ | 196 | GFS2_DIF_SYSTEM| \ |
204 | GFS2_DIF_INHERIT_DIRECTIO| \ | ||
205 | GFS2_DIF_INHERIT_JDATA) | 197 | GFS2_DIF_INHERIT_JDATA) |
206 | 198 | ||
207 | /** | 199 | /** |
@@ -292,8 +284,6 @@ static int gfs2_set_flags(struct file *filp, u32 __user *ptr) | |||
292 | if (!S_ISDIR(inode->i_mode)) { | 284 | if (!S_ISDIR(inode->i_mode)) { |
293 | if (gfsflags & GFS2_DIF_INHERIT_JDATA) | 285 | if (gfsflags & GFS2_DIF_INHERIT_JDATA) |
294 | gfsflags ^= (GFS2_DIF_JDATA | GFS2_DIF_INHERIT_JDATA); | 286 | gfsflags ^= (GFS2_DIF_JDATA | GFS2_DIF_INHERIT_JDATA); |
295 | if (gfsflags & GFS2_DIF_INHERIT_DIRECTIO) | ||
296 | gfsflags ^= (GFS2_DIF_DIRECTIO | GFS2_DIF_INHERIT_DIRECTIO); | ||
297 | return do_gfs2_set_flags(filp, gfsflags, ~0); | 287 | return do_gfs2_set_flags(filp, gfsflags, ~0); |
298 | } | 288 | } |
299 | return do_gfs2_set_flags(filp, gfsflags, ~GFS2_DIF_JDATA); | 289 | return do_gfs2_set_flags(filp, gfsflags, ~GFS2_DIF_JDATA); |
@@ -494,11 +484,6 @@ static int gfs2_open(struct inode *inode, struct file *file) | |||
494 | goto fail_gunlock; | 484 | goto fail_gunlock; |
495 | } | 485 | } |
496 | 486 | ||
497 | /* Listen to the Direct I/O flag */ | ||
498 | |||
499 | if (ip->i_di.di_flags & GFS2_DIF_DIRECTIO) | ||
500 | file->f_flags |= O_DIRECT; | ||
501 | |||
502 | gfs2_glock_dq_uninit(&i_gh); | 487 | gfs2_glock_dq_uninit(&i_gh); |
503 | } | 488 | } |
504 | 489 | ||
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 12fe38fe498..63a8a902d9d 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -65,7 +65,6 @@ void gfs2_tune_init(struct gfs2_tune *gt) | |||
65 | gt->gt_quota_quantum = 60; | 65 | gt->gt_quota_quantum = 60; |
66 | gt->gt_atime_quantum = 3600; | 66 | gt->gt_atime_quantum = 3600; |
67 | gt->gt_new_files_jdata = 0; | 67 | gt->gt_new_files_jdata = 0; |
68 | gt->gt_new_files_directio = 0; | ||
69 | gt->gt_max_readahead = 1 << 18; | 68 | gt->gt_max_readahead = 1 << 18; |
70 | gt->gt_stall_secs = 600; | 69 | gt->gt_stall_secs = 600; |
71 | gt->gt_complain_secs = 10; | 70 | gt->gt_complain_secs = 10; |
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index 6f7e2e5858e..74846559fc3 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c | |||
@@ -412,7 +412,6 @@ TUNE_ATTR(max_readahead, 0); | |||
412 | TUNE_ATTR(complain_secs, 0); | 412 | TUNE_ATTR(complain_secs, 0); |
413 | TUNE_ATTR(statfs_slow, 0); | 413 | TUNE_ATTR(statfs_slow, 0); |
414 | TUNE_ATTR(new_files_jdata, 0); | 414 | TUNE_ATTR(new_files_jdata, 0); |
415 | TUNE_ATTR(new_files_directio, 0); | ||
416 | TUNE_ATTR(quota_simul_sync, 1); | 415 | TUNE_ATTR(quota_simul_sync, 1); |
417 | TUNE_ATTR(quota_cache_secs, 1); | 416 | TUNE_ATTR(quota_cache_secs, 1); |
418 | TUNE_ATTR(stall_secs, 1); | 417 | TUNE_ATTR(stall_secs, 1); |
@@ -441,7 +440,6 @@ static struct attribute *tune_attrs[] = { | |||
441 | &tune_attr_quotad_secs.attr, | 440 | &tune_attr_quotad_secs.attr, |
442 | &tune_attr_quota_scale.attr, | 441 | &tune_attr_quota_scale.attr, |
443 | &tune_attr_new_files_jdata.attr, | 442 | &tune_attr_new_files_jdata.attr, |
444 | &tune_attr_new_files_directio.attr, | ||
445 | NULL, | 443 | NULL, |
446 | }; | 444 | }; |
447 | 445 | ||