From: David Chinner <dgc@sgi.com>
To: Russell Cattelan <cattelan@thebarn.com>
Cc: linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: [PATCH] Remove DIO_OWN_LOCKING
Date: Mon, 16 Oct 2006 07:57:19 +1000 [thread overview]
Message-ID: <20061015215719.GL19345@melbourne.sgi.com> (raw)
In-Reply-To: <1160762973.5723.81.camel@xenon.msp.redhat.com>
On Fri, Oct 13, 2006 at 01:09:33PM -0500, Russell Cattelan wrote:
> On Fri, 2006-10-13 at 12:48 +1000, David Chinner wrote:
> > On Thu, Oct 12, 2006 at 07:56:38PM -0500, Russell Cattelan wrote:
> > > While trying to fix up GFS2 directio and reading through the code
> > > involving the various lock flags I discovered the DIO_OWN_LOCKING
> > > flag is no longer used.
> > >
> > > XFS recently changed it xfs_vm_direct_IO function to call
> > > blockdev_direct_IO_no_locking for reads and
> > > blockdev_direct_IO_own_locking
> > > for writes. But DIO_OWN_LOCKING is only used in the direct IO read case
> > > so effectively the flag is never checked an therefore can probably be
> > > removed.
> >
> > NACK.
> >
> > This breaks XFS direct writes - the DIO_OWN_LOCKING flag has meaning
> > for direct writes even though a simple grep doesn't give you any
> > hits. get_more_blocks() sets the create flag unconditionally on
> > writes when DIO_OWN_LOCKING is set, and this is needed for XFS to be
> > able to allocate underlying blocks if the direct write is over a
> > hole or past EOF.
>
> Arrghh you are correct!
> Even more reason to clean this logic up.
No argument here ;)
> look this version over and see what you think.
>
> comments not in final state but is describing what
> is being changed an why.
>
> Basically the idea is to have separate flags for locking
> and creation, overloading the flags meant that they were
> specific for XFS needs and therefore did not work for
> GFS.
*nod*
That was always going to happen as soon as another filesystem
wanted to use it's own locking and had different create semantics...
> Also go to a TRUE state if flag on and a FALSE state if flag off.
> vs the mix of true flag (DIO_LOCKING) vs false flag
> (DIO_NO_LOCKING)
Looks like a good approach to me - it's cleaner and more extensible
that what we have now....
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
prev parent reply other threads:[~2006-10-15 21:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-13 0:56 [PATCH] Remove DIO_OWN_LOCKING Russell Cattelan
2006-10-13 2:48 ` David Chinner
2006-10-13 18:09 ` Russell Cattelan
2006-10-15 21:57 ` 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=20061015215719.GL19345@melbourne.sgi.com \
--to=dgc@sgi.com \
--cc=cattelan@thebarn.com \
--cc=linux-fsdevel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).