Commit c58fec8d authored by Herry Wiputra's avatar Herry Wiputra Committed by Nathan Scott

[XFS] Add support for unsetting realtime flag on realtime file which

has no extents allocated.

SGI Modid: xfs-linux:xfs-kern:18776a
Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
parent 3ccebd8b
......@@ -823,10 +823,14 @@ xfs_setattr(
mp->m_sb.sb_blocklog;
}
if (mask & XFS_AT_XFLAGS) {
ip->i_d.di_flags = 0;
/* can't set PREALLOC this way, just preserve it */
ip->i_d.di_flags =
(ip->i_d.di_flags & XFS_DIFLAG_PREALLOC);
if (vap->va_xflags & XFS_XFLAG_REALTIME) {
ip->i_d.di_flags |= XFS_DIFLAG_REALTIME;
ip->i_iocore.io_flags |= XFS_IOCORE_RT;
} else {
ip->i_iocore.io_flags &= ~XFS_IOCORE_RT;
}
if (vap->va_xflags & XFS_XFLAG_IMMUTABLE)
ip->i_d.di_flags |= XFS_DIFLAG_IMMUTABLE;
......@@ -838,7 +842,6 @@ xfs_setattr(
ip->i_d.di_flags |= XFS_DIFLAG_NOATIME;
if (vap->va_xflags & XFS_XFLAG_NODUMP)
ip->i_d.di_flags |= XFS_DIFLAG_NODUMP;
/* can't set PREALLOC this way, just ignore it */
}
xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
timeflags |= XFS_ICHGTIME_CHG;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment