Re: xfs_fsr / xfs_swap_extents() broken in 3.8-rc4?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 19, 2013 at 06:15:40PM +0100, Torsten Kaiser wrote:
> Hi,
> 
> I just used xfs_fsr the first time under a 3.8-rc kernel and was
> spammed with an enormous amount of "XFS_IOC_SWAPEXT failed: ino=56118:
> Invalid argument" messages.
> 
> I found the thread http://marc.info/?t=135727980600001&r=1&w=2 and
> went to check the kernel sources for these additional checks, because
> I wanted to know what was allowed earlier and is now failing.
> 
> I found commit fb59581404ab7ec5075299065c22cb211a9262a9:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=fb59581404ab7ec5075299065c22cb211a9262a9#patch2
> 
> --- a/fs/xfs/xfs_dfrag.c
> +++ b/fs/xfs/xfs_dfrag.c
> @@ -246,12 +246,10 @@ xfs_swap_extents(
>                 goto out_unlock;
>         }
> 
> -       if (VN_CACHED(VFS_I(tip)) != 0) {
> -               error = xfs_flushinval_pages(tip, 0, -1,
> -                               FI_REMAPF_LOCKED);
> -               if (error)
> -                       goto out_unlock;
> -       }
> +       error = -filemap_write_and_wait(VFS_I(ip)->i_mapping);
> +       if (error)
> +               goto out_unlock;
> +       truncate_pagecache_range(VFS_I(ip), 0, -1);
> 
> That looks really wrong to me. The old code was calling
> xfs_flushinval_pages() for *tip*, but the new code is working on *ip*.
> Was that change really intended? Is looks unintentional and is not
> mentioned in the commit comment...
> 
> Thanks for looking / correcting me if I'm missing something obvious,
> but I can't find a reason for this change...

I think you're right - good catch. Can you send the patch with a
proper subject, commit message and sign-ofif?

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux