aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2006-01-10 23:28:28 -0500
committerNathan Scott <nathans@sgi.com>2006-01-10 23:28:28 -0500
commitdd9f438e32900d67def49fa1b8961b3e19b6fefc (patch)
treea0a51110a13445f3a27b72303e36ef6ef48db0eb /fs/xfs/xfs_inode.c
parent061f7209bdfb0193b306f88b4ff36b2574b001d3 (diff)
[XFS] Implement the di_extsize allocator hint for non-realtime files as
well. Also provides a mechanism for inheriting this property from the parent directory for new files. SGI-PV: 945264 SGI-Modid: xfs-linux-melb:xfs-kern:24367a Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index df0d4572d70a..e486c7d244c2 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -809,6 +809,10 @@ _xfs_dic2xflags(
809 flags |= XFS_XFLAG_PROJINHERIT; 809 flags |= XFS_XFLAG_PROJINHERIT;
810 if (di_flags & XFS_DIFLAG_NOSYMLINKS) 810 if (di_flags & XFS_DIFLAG_NOSYMLINKS)
811 flags |= XFS_XFLAG_NOSYMLINKS; 811 flags |= XFS_XFLAG_NOSYMLINKS;
812 if (di_flags & XFS_DIFLAG_EXTSIZE)
813 flags |= XFS_XFLAG_EXTSIZE;
814 if (di_flags & XFS_DIFLAG_EXTSZINHERIT)
815 flags |= XFS_XFLAG_EXTSZINHERIT;
812 } 816 }
813 817
814 return flags; 818 return flags;
@@ -1192,11 +1196,19 @@ xfs_ialloc(
1192 if ((mode & S_IFMT) == S_IFDIR) { 1196 if ((mode & S_IFMT) == S_IFDIR) {
1193 if (pip->i_d.di_flags & XFS_DIFLAG_RTINHERIT) 1197 if (pip->i_d.di_flags & XFS_DIFLAG_RTINHERIT)
1194 di_flags |= XFS_DIFLAG_RTINHERIT; 1198 di_flags |= XFS_DIFLAG_RTINHERIT;
1195 } else { 1199 if (pip->i_d.di_flags & XFS_DIFLAG_EXTSZINHERIT) {
1200 di_flags |= XFS_DIFLAG_EXTSZINHERIT;
1201 ip->i_d.di_extsize = pip->i_d.di_extsize;
1202 }
1203 } else if ((mode & S_IFMT) == S_IFREG) {
1196 if (pip->i_d.di_flags & XFS_DIFLAG_RTINHERIT) { 1204 if (pip->i_d.di_flags & XFS_DIFLAG_RTINHERIT) {
1197 di_flags |= XFS_DIFLAG_REALTIME; 1205 di_flags |= XFS_DIFLAG_REALTIME;
1198 ip->i_iocore.io_flags |= XFS_IOCORE_RT; 1206 ip->i_iocore.io_flags |= XFS_IOCORE_RT;
1199 } 1207 }
1208 if (pip->i_d.di_flags & XFS_DIFLAG_EXTSZINHERIT) {
1209 di_flags |= XFS_DIFLAG_EXTSIZE;
1210 ip->i_d.di_extsize = pip->i_d.di_extsize;
1211 }
1200 } 1212 }
1201 if ((pip->i_d.di_flags & XFS_DIFLAG_NOATIME) && 1213 if ((pip->i_d.di_flags & XFS_DIFLAG_NOATIME) &&
1202 xfs_inherit_noatime) 1214 xfs_inherit_noatime)
@@ -1262,7 +1274,7 @@ xfs_isize_check(
1262 if ((ip->i_d.di_mode & S_IFMT) != S_IFREG) 1274 if ((ip->i_d.di_mode & S_IFMT) != S_IFREG)
1263 return; 1275 return;
1264 1276
1265 if ( ip->i_d.di_flags & XFS_DIFLAG_REALTIME ) 1277 if (ip->i_d.di_flags & (XFS_DIFLAG_REALTIME | XFS_DIFLAG_EXTSIZE))
1266 return; 1278 return;
1267 1279
1268 nimaps = 2; 1280 nimaps = 2;