From: David Chinner <dgc@sgi.com>
To: kanishk rastogi <kanishk.85@gmail.com>
Cc: David Chinner <dgc@sgi.com>, xfs@oss.sgi.com
Subject: Re: Need of inode->i_mutex in xfs_write()
Date: Fri, 7 Sep 2007 22:15:05 +1000 [thread overview]
Message-ID: <20070907121505.GX734179@sgi.com> (raw)
In-Reply-To: <9ee2fe770709062243u67956d26o7222435956213f0@mail.gmail.com>
On Fri, Sep 07, 2007 at 11:28:27AM +0545, kanishk rastogi wrote:
> On 8/24/07, David Chinner <dgc@sgi.com> wrote:
> > On Tue, Aug 21, 2007 at 09:11:56PM +0545, kanishk rastogi wrote:
> > > I was looking at the xfs_write code path in kernel 2.6.20 .......
> > > I saw it acquiring inode->i_mutex .
> > > Whats the need ?
> > > What are we safegaurding inode for.
> >
> > See Documentation/filesystems/Locking and other files in that
> > directory for what i_mutex is supposed to protect.
> >
> > XFS is different as it has it's own inodes and inode locks, but
> > it still mostly uses i_mutex inteh accepted way.
> >
>
> xfs_write comes in file_operations->aio_write()
> and the documentation doesnt say anything for it to acquire i_mutex in
> that path.
The i_mutex is supposed to be held across various calls into
generic code. See generic_file_aio_write() for the common
implementation of ->aio_write(). The entire write path is
supposed to be protected by the i_mutex.
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
prev parent reply other threads:[~2007-09-07 12:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-21 15:26 Need of inode->i_mutex in xfs_write() kanishk rastogi
2007-08-23 22:51 ` David Chinner
2007-09-07 5:43 ` kanishk rastogi
2007-09-07 12:15 ` David Chinner [this message]
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=20070907121505.GX734179@sgi.com \
--to=dgc@sgi.com \
--cc=kanishk.85@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox