Commit d09840f8 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'xfs-6.11-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull xfs fixes from Chandan Babu:

 - Check for presence of only 'attr' feature before scrubbing an inode's
   attribute fork.

 - Restore the behaviour of setting AIL thread to TASK_INTERRUPTIBLE for
   long (i.e. 50ms) sleep durations to prevent high load averages.

 - Do not allow users to change the realtime flag of a file unless the
   datadev and rtdev both support fsdax access modes.

* tag 'xfs-6.11-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: conditionally allow FS_XFLAG_REALTIME changes if S_DAX is set
  xfs: revert AIL TASK_KILLABLE threshold
  xfs: attr forks require attr, not attr2
parents b7181758 8d167620
......@@ -938,7 +938,13 @@ xchk_bmap(
}
break;
case XFS_ATTR_FORK:
if (!xfs_has_attr(mp) && !xfs_has_attr2(mp))
/*
* "attr" means that an attr fork was created at some point in
* the life of this filesystem. "attr2" means that inodes have
* variable-sized data/attr fork areas. Hence we only check
* attr here.
*/
if (!xfs_has_attr(mp))
xchk_ino_set_corrupt(sc, sc->ip->i_ino);
break;
default:
......
......@@ -483,6 +483,17 @@ xfs_ioctl_setattr_xflags(
/* Can't change realtime flag if any extents are allocated. */
if (ip->i_df.if_nextents || ip->i_delayed_blks)
return -EINVAL;
/*
* If S_DAX is enabled on this file, we can only switch the
* device if both support fsdax. We can't update S_DAX because
* there might be other threads walking down the access paths.
*/
if (IS_DAX(VFS_I(ip)) &&
(mp->m_ddev_targp->bt_daxdev == NULL ||
(mp->m_rtdev_targp &&
mp->m_rtdev_targp->bt_daxdev == NULL)))
return -EINVAL;
}
if (rtflag) {
......
......@@ -644,7 +644,12 @@ xfsaild(
set_freezable();
while (1) {
if (tout)
/*
* Long waits of 50ms or more occur when we've run out of items
* to push, so we only want uninterruptible state if we're
* actually blocked on something.
*/
if (tout && tout <= 20)
set_current_state(TASK_KILLABLE|TASK_FREEZABLE);
else
set_current_state(TASK_INTERRUPTIBLE|TASK_FREEZABLE);
......
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