From: Joel Becker <jlbec@evilplan.org>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] Treat writes as new when holes span across page boundaries
Date: Tue, 22 Feb 2011 15:34:18 -0800 [thread overview]
Message-ID: <20110222233417.GC28774@noexit> (raw)
In-Reply-To: <AANLkTikByGbpDyDmbM7kNV-ZAt1Ts5BzbM0Ospi=o8Ki@mail.gmail.com>
On Tue, Feb 22, 2011 at 04:09:47PM -0600, Goldwyn Rodrigues wrote:
> On Tue, Feb 22, 2011 at 3:54 PM, Joel Becker <jlbec@evilplan.org> wrote:
> > On Tue, Feb 22, 2011 at 01:39:28PM -0800, Joel Becker wrote:
> > ? ? ? ?Looking some more. ?ocfs2_zero_tail() is supposed to handle
> > this, isn't it? ?ocfs2_write_begin_nolock() calls ocfs2_zero_tail(pos),
> > which calls ocfs2_zero_extend(pos), which works up to
> > ocfs2_clusters_for_bytes(pos). ?Doesn't this include your cluster?
> > Shouldn't the page already be loaded into the pagecache with zeros?
> >
> >
>
> Din't you discard that idea in my previous attempt? ;)
I might have ;-) I'm reloading state here, so I might be coming
back to something you've already seen. I'm trying to ask questions that
make both of us come to the same understanding. So my apologies if I
didn't get what you were saying before.
For example, I thought you were saying that a write from 0 to
1023 (new i_size of 1024), with a blocksize of 4K and a clustersize of
8K, should zero from 1024 to 8191. That is, zeroing the entire cluster
at allocation time, even though the second block does not contain
i_size. My contention is that 1024 to 4095 should be zeroed for this
write. We would only zero the second block when the file is later
extended past 4096.
I may have been confused because ocfs2_zero_extend() only used
to matter for nonsparse, where this behavior was different. Which of
the above did you mean?
> On a serious note, no it doesn't because zero_start and zero_to_size
> are the same when pos is on a block boundary and hence the loop does
> not execute.
If they are the same (i_size == pos), there is no hole. I don't
see how there is a problem.
Joel
--
Life's Little Instruction Book #464
"Don't miss the magic of the moment by focusing on what's
to come."
http://www.jlbec.org/
jlbec at evilplan.org
next prev parent reply other threads:[~2011-02-22 23:34 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-17 15:44 [Ocfs2-devel] [PATCH] Treat writes as new when holes span across page boundaries Goldwyn Rodrigues
2011-02-20 7:09 ` Joel Becker
2011-02-20 18:45 ` Goldwyn Rodrigues
2011-02-21 2:08 ` Joel Becker
2011-02-21 5:44 ` Goldwyn Rodrigues
2011-02-22 8:36 ` Joel Becker
2011-02-22 9:37 ` Joel Becker
2011-02-22 19:02 ` Goldwyn Rodrigues
2011-02-22 21:39 ` Joel Becker
2011-02-22 21:54 ` Joel Becker
2011-02-22 22:09 ` Goldwyn Rodrigues
2011-02-22 23:34 ` Joel Becker [this message]
2011-02-23 0:05 ` Goldwyn Rodrigues
2011-02-23 9:39 ` Joel Becker
2011-02-23 14:43 ` Goldwyn Rodrigues
2011-02-23 19:13 ` Joel Becker
2011-02-23 19:28 ` Joel Becker
2011-02-23 21:00 ` Goldwyn Rodrigues
2011-02-23 21:23 ` Joel Becker
2011-02-23 20:54 ` Goldwyn Rodrigues
2011-02-23 21:17 ` Joel Becker
2011-02-23 21:35 ` Goldwyn Rodrigues
2011-02-23 21:37 ` Joel Becker
2011-02-23 21:44 ` Joel Becker
2011-02-23 22:31 ` Goldwyn Rodrigues
2011-02-28 18:03 ` Joel Becker
2011-02-28 19:07 ` Goldwyn Rodrigues
2011-02-28 19:40 ` Joel Becker
2011-03-01 2:11 ` Goldwyn Rodrigues
2011-02-24 16:32 ` Goldwyn Rodrigues
2011-02-24 18:16 ` Mark Fasheh
2011-02-23 21:09 ` Goldwyn Rodrigues
2011-02-23 21:21 ` Joel Becker
2011-03-26 22:48 ` Joel Becker
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=20110222233417.GC28774@noexit \
--to=jlbec@evilplan.org \
--cc=ocfs2-devel@oss.oracle.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).