From: David Howells <dhowells@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 3/3] AFS: Implement basic file write support
Date: Wed, 09 May 2007 11:25:47 +0100 [thread overview]
Message-ID: <997.1178706347@redhat.com> (raw)
In-Reply-To: <20070508170051.eb4751ce.akpm@linux-foundation.org>
Andrew Morton <akpm@linux-foundation.org> wrote:
> > + BUG_ON(i_size > 0xffffffff); // TODO: use 64-bit store
>
> You're sure this isn't user-triggerable?
Hmmm... I'm not. I'll whip up a patch for this.
> kmap_atomic() could be used here and is better.
Yeah. It used to have something that slept in the middle of it, but that's no
longer there. I'll add to the patch.
> We have this zero_user_page() thing heading in which could perhaps be used
> here also.
Okay. I'll have a look at it once it's there.
> > + ASSERTRANGE(wb->first, <=, index, <=, wb->last);
>
> wow.
:-)
The assertions I've put in have been very useful.
> > + set_page_dirty(page);
> > +
> > + if (PageDirty(page))
> > + _debug("dirtied");
> > +
> > + return 0;
> > +}
>
> One would normally run mark_inode_dirty() after any i_size_write()?
Not in this case, I assume, because set_page_dirty() ultimately calls
__mark_inode_dirty(), but I could be wrong.
> We can invalidate pages and we can truncate them and we can clean them.
> But here we have a new operation, "killing". I wonder what that is.
I can call it invalidation if you like, though that name is already reserved
as it were:-/ I suppose it might actually make sense for me to call
invalidatepage() myself.
> > + if (wbc->sync_mode != WB_SYNC_NONE)
> > + wait_on_page_writeback(page);
>
> Didn't the VFS already do that?
I'm not entirely sure. Looking at generic_writepages(), I guess so. I'll
patch it out.
> > + if (PageWriteback(page) || !PageDirty(page)) {
> > + unlock_page(page);
> > + return 0;
> > + }
>
> And some of that?
Yeah. Seems so. I'll patch that out too.
What I'd like to do is ditch writepage() entirely - I'm not sure it's entirely
necessary with the availability of writepages() - but I'll look at that
another time.
> I have this vague prehistoric memory that something can go wrong at the VFS
> level if the address_space writes back more pages than it was asked to.
> But I forget what the issue was and it would be silly to have an issue
> with that anyway. Something to keep an eye out for.
Okay.
Thanks for the 'cherry-pick'. I'll hopefully have a revision patch for you
soon.
David
next prev parent reply other threads:[~2007-05-09 10:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-08 19:43 [PATCH 1/3] AFS: Export a couple of core functions for AFS write support David Howells
2007-05-08 19:44 ` [PATCH 2/3] AFS: AFS fixups David Howells
2007-05-08 19:44 ` [PATCH 3/3] AFS: Implement basic file write support David Howells
2007-05-09 0:00 ` Andrew Morton
2007-05-09 10:25 ` David Howells [this message]
2007-05-09 10:41 ` Andrew Morton
2007-05-09 11:07 ` David Howells
2007-05-09 16:28 ` Andrew Morton
2007-05-09 23:42 ` Nick Piggin
2007-05-10 9:56 ` David Howells
2007-05-11 6:14 ` Nick Piggin
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=997.1178706347@redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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).