public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Monnerie <michael.monnerie@is.it-management.at>
To: xfs@oss.sgi.com
Cc: Christoph Hellwig <hch@infradead.org>, Jeff Liu <jeff.liu@oracle.com>
Subject: Re: SEEK_DATA/SEEK_HOLE support
Date: Wed, 5 Oct 2011 09:34:26 +0200	[thread overview]
Message-ID: <201110050934.28021@zmi.at> (raw)
In-Reply-To: <20111005043659.GO3159@dastard>


[-- Attachment #1.1: Type: Text/Plain, Size: 2195 bytes --]

On Mittwoch, 5. Oktober 2011 Dave Chinner wrote:
> That will only work if you can prevent concurrent unwritten extent
> conversion from happening while we do the separate tag lookups on
> the range because it requires two radix tree tag lookups rather than
> just one index lookup. i.e. miss the dirty page because it went
> dirty->writeback during the dirty tag search, and miss the same page
> when doing the writeback lookup because it went writeback->clean
> very quickly due to IO completion.
> 
> So to stop that from happening, it requires that filesystems can
> exclude unwritten extent conversion from happening while a
> SEEK_HOLE/SEEK_DATA operation is in progress, and that the
> filesystem can safely do mapping tree lookups while providing that
> extent tree exclusion.  I know that XFS has no problems here, but
> filesystems that use i_mutex for everything might be in trouble.
> 
> Besides, if we just look for pages in the cache over unwritten
> extents (i.e. someone has treated it as data already), then it can
> be done locklessly without having to worry about page state changes
> occurring concurrently...

I'd like to understand why it's important to care about locking here. As 
I understand it, SEEK_* is used for example to copy a file efficiently. 
If that is performed on a file that is currently being written to, the 
resulting copy will probably be bogus anyway, even without SEEK_* usage.

There might be a case where it is important, but I can't see that atm. 

If I understand it correctly, then if we do not lock during SEEK_* 
operations, a part of the file might be missed to copy, but that's only 
for cases where the source file is being written to. If that file is 
100GB size (to be extreme), and we copy it while it's modified, we will 
almost for sure have a copy that is partly modified, partly not, 
depending on which area was modified before read and which not. So 
where's the point?

-- 
mit freundlichen Grüssen,
Michael Monnerie, Ing. BSc

it-management Internet Services: Protéger
http://proteger.at [gesprochen: Prot-e-schee]
Tel: +43 660 / 415 6531

// Haus zu verkaufen: http://zmi.at/langegg/

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 121 bytes --]

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

  parent reply	other threads:[~2011-10-05  7:34 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-02 15:04 SEEK_DATA/SEEK_HOLE support Jeff Liu
2011-10-02 15:42 ` Christoph Hellwig
2011-10-02 16:06   ` Jeff Liu
2011-10-02 17:59     ` Christoph Hellwig
2011-10-02 19:11       ` Andi Kleen
2011-10-03  4:04       ` Jeff Liu
2011-10-03 23:43         ` Dave Chinner
2011-10-04 13:02           ` Christoph Hellwig
2011-10-05  4:36             ` Dave Chinner
2011-10-05  5:32               ` Jeff Liu
2011-10-05  9:23                 ` Dave Chinner
2011-10-05 13:56                   ` Jeff Liu
2011-10-05  7:34               ` Michael Monnerie [this message]
2011-10-05  9:36                 ` Dave Chinner
2011-10-05 18:22                   ` Michael Monnerie
2011-10-06  0:32                     ` Dave Chinner
2011-11-14 10:24 ` Christoph Hellwig
2011-11-14 12:47   ` Jeff Liu
2011-11-14 12:50     ` Christoph Hellwig
2011-11-19  8:29       ` XFS SEEK_DATA/SEEK_HOLE support V1 Jeff Liu
2011-11-19  8:34         ` Jeff Liu
2011-11-19  8:37         ` [PATCH] Introduce SEEK_DATA/SEEK_HOLE support to XFS V1 Jeff Liu
2011-11-19 19:11           ` Christoph Hellwig
2011-11-20 13:15             ` Jeff Liu
2011-11-20  0:30           ` Dave Chinner
2011-11-20 13:59             ` Jeff Liu
2011-11-20 15:30               ` Christoph Hellwig
2011-11-20 22: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=201110050934.28021@zmi.at \
    --to=michael.monnerie@is.it-management.at \
    --cc=hch@infradead.org \
    --cc=jeff.liu@oracle.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