All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arkadiusz Miskiewicz <arekm@maven.pl>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: 2.6.27.7 vanilla, project quota enabled and process stuck in D state (repeatable every time)
Date: Thu, 4 Dec 2008 09:13:06 +0100	[thread overview]
Message-ID: <200812040913.06733.arekm@maven.pl> (raw)
In-Reply-To: <20081203220934.GA32301@disturbed>

On Wednesday 03 of December 2008, Dave Chinner wrote:
> On Wed, Dec 03, 2008 at 10:42:29PM +0100, Arkadiusz Miskiewicz wrote:
> > On Wednesday 03 of December 2008, Dave Chinner wrote:

> > [arekm@farm rpm]$ touch /home/users/arekm/tmp/aa
> > [arekm@farm rpm]$ ./a.out
> > ret=-1 Invalid cross-device link
>
> Well, that's what we needed to know. The bug:
>
> 199         /*
> 200          * Lock all the participating inodes. Depending upon whether
> 201          * the target_name exists in the target directory, and
> 202          * whether the target directory is the same as the source
> 203          * directory, we can lock from 2 to 4 inodes.
> 204          */
> 205  >>>>>  xfs_lock_inodes(inodes, num_inodes, XFS_ILOCK_EXCL);
> 206
> 207         /*
> 208          * If we are using project inheritance, we only allow renames
> 209          * into our tree when the project IDs are the same; else the
> 210          * tree quota mechanism would be circumvented.
> 211          */
> 212         if (unlikely((target_dp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT)
> && 213                      (target_dp->i_d.di_projid !=
> src_ip->i_d.di_projid))) { 214                 error = XFS_ERROR(EXDEV);
> 215  >>>>>>>        xfs_rename_unlock4(inodes, XFS_ILOCK_SHARED);
> 216                 xfs_trans_cancel(tp, cancel_flags);
> 217                 goto std_return;
> 218         }
>
> Is that the unlock of the inodes is using the incorrect lock
> type for the unlock, (inodes lock XFS_ILOCK_EXCL, unlocked
> XFS_ILOCK_SHARED) which means they don't get unlocked and the next attempt
> to do anything with those inodes will hang.
>
> Compile-tested-only patch below that should fix the problem.

It fixes the problem for me. Thanks! I hope that it will reach stable@ team 
for 2.6.27.9.

> Cheers,
>
> Dave.



-- 
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/

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

  reply	other threads:[~2008-12-04  8:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-02 18:49 2.6.27.7 vanilla, project quota enabled and process stuck in D state (repeatable every time) Arkadiusz Miskiewicz
2008-12-02 19:03 ` Arkadiusz Miskiewicz
2008-12-03  3:20 ` Dave Chinner
2008-12-03 13:06   ` Arkadiusz Miskiewicz
2008-12-03 13:35     ` Arkadiusz Miskiewicz
2008-12-03 21:30     ` Dave Chinner
2008-12-03 21:42       ` Arkadiusz Miskiewicz
2008-12-03 22:07         ` Christoph Hellwig
2008-12-03 22:42           ` Christoph Hellwig
2008-12-03 22:09         ` Dave Chinner
2008-12-04  8:13           ` Arkadiusz Miskiewicz [this message]
2008-12-04 12:32           ` Christoph Hellwig
2008-12-04 21:34             ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200812040913.06733.arekm@maven.pl \
    --to=arekm@maven.pl \
    --cc=david@fromorbit.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.