diff options
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r-- | fs/xfs/xfs_inode.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 8fdd30d9ba56..2ef100be6c4f 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include "xfs_dir2_trace.h" | 48 | #include "xfs_dir2_trace.h" |
49 | #include "xfs_quota.h" | 49 | #include "xfs_quota.h" |
50 | #include "xfs_acl.h" | 50 | #include "xfs_acl.h" |
51 | #include "xfs_filestream.h" | ||
51 | 52 | ||
52 | #include <linux/log2.h> | 53 | #include <linux/log2.h> |
53 | 54 | ||
@@ -818,6 +819,8 @@ _xfs_dic2xflags( | |||
818 | flags |= XFS_XFLAG_EXTSZINHERIT; | 819 | flags |= XFS_XFLAG_EXTSZINHERIT; |
819 | if (di_flags & XFS_DIFLAG_NODEFRAG) | 820 | if (di_flags & XFS_DIFLAG_NODEFRAG) |
820 | flags |= XFS_XFLAG_NODEFRAG; | 821 | flags |= XFS_XFLAG_NODEFRAG; |
822 | if (di_flags & XFS_DIFLAG_FILESTREAM) | ||
823 | flags |= XFS_XFLAG_FILESTREAM; | ||
821 | } | 824 | } |
822 | 825 | ||
823 | return flags; | 826 | return flags; |
@@ -1151,7 +1154,7 @@ xfs_ialloc( | |||
1151 | /* | 1154 | /* |
1152 | * Project ids won't be stored on disk if we are using a version 1 inode. | 1155 | * Project ids won't be stored on disk if we are using a version 1 inode. |
1153 | */ | 1156 | */ |
1154 | if ( (prid != 0) && (ip->i_d.di_version == XFS_DINODE_VERSION_1)) | 1157 | if ((prid != 0) && (ip->i_d.di_version == XFS_DINODE_VERSION_1)) |
1155 | xfs_bump_ino_vers2(tp, ip); | 1158 | xfs_bump_ino_vers2(tp, ip); |
1156 | 1159 | ||
1157 | if (XFS_INHERIT_GID(pip, vp->v_vfsp)) { | 1160 | if (XFS_INHERIT_GID(pip, vp->v_vfsp)) { |
@@ -1196,8 +1199,16 @@ xfs_ialloc( | |||
1196 | flags |= XFS_ILOG_DEV; | 1199 | flags |= XFS_ILOG_DEV; |
1197 | break; | 1200 | break; |
1198 | case S_IFREG: | 1201 | case S_IFREG: |
1202 | if (xfs_inode_is_filestream(pip)) { | ||
1203 | error = xfs_filestream_associate(pip, ip); | ||
1204 | if (error < 0) | ||
1205 | return -error; | ||
1206 | if (!error) | ||
1207 | xfs_iflags_set(ip, XFS_IFILESTREAM); | ||
1208 | } | ||
1209 | /* fall through */ | ||
1199 | case S_IFDIR: | 1210 | case S_IFDIR: |
1200 | if (unlikely(pip->i_d.di_flags & XFS_DIFLAG_ANY)) { | 1211 | if (pip->i_d.di_flags & XFS_DIFLAG_ANY) { |
1201 | uint di_flags = 0; | 1212 | uint di_flags = 0; |
1202 | 1213 | ||
1203 | if ((mode & S_IFMT) == S_IFDIR) { | 1214 | if ((mode & S_IFMT) == S_IFDIR) { |
@@ -1234,6 +1245,8 @@ xfs_ialloc( | |||
1234 | if ((pip->i_d.di_flags & XFS_DIFLAG_NODEFRAG) && | 1245 | if ((pip->i_d.di_flags & XFS_DIFLAG_NODEFRAG) && |
1235 | xfs_inherit_nodefrag) | 1246 | xfs_inherit_nodefrag) |
1236 | di_flags |= XFS_DIFLAG_NODEFRAG; | 1247 | di_flags |= XFS_DIFLAG_NODEFRAG; |
1248 | if (pip->i_d.di_flags & XFS_DIFLAG_FILESTREAM) | ||
1249 | di_flags |= XFS_DIFLAG_FILESTREAM; | ||
1237 | ip->i_d.di_flags |= di_flags; | 1250 | ip->i_d.di_flags |= di_flags; |
1238 | } | 1251 | } |
1239 | /* FALLTHROUGH */ | 1252 | /* FALLTHROUGH */ |