From: David Howells <dhowells@redhat.com>
To: Nick Piggin <npiggin@suse.de>
Cc: dhowells@redhat.com, Andrew Morton <akpm@linux-foundation.org>,
linux-fsdevel@vger.kernel.org, mhalcrow@us.ibm.com,
phillip@hellewell.homeip.net, sfrench@samba.org
Subject: Re: [rfc][patch 3/5] afs: new aops
Date: Mon, 12 Nov 2007 15:29:14 +0000 [thread overview]
Message-ID: <6161.1194881354@redhat.com> (raw)
In-Reply-To: <20071112071448.GE22953@wotan.suse.de>
Nick Piggin <npiggin@suse.de> wrote:
> - ASSERTCMP(start + len, <=, PAGE_SIZE);
> + ASSERTCMP(len, <=, PAGE_CACHE_SIZE);
Do you guarantee this will work if PAGE_CACHE_SIZE != PAGE_SIZE? If not, you
can't make this particular change.
Do we ever intend to have PAGE_CACHE_SIZE != PAGE_SIZE? If not, then surely
the former is redundant and should scrapped to avoid confusion?
> + i_size = i_size_read(&vnode->vfs_inode);
> + if (pos + len > i_size)
> + eof = i_size;
> + else
> + eof = PAGE_CACHE_SIZE;
> +
> + ret = afs_vnode_fetch_data(vnode, key, 0, eof, page);
That can't be right, surely. Either 'eof' is the size of the file or it's the
length of the data to be read. It can't be both. The first case needs eof
masking off. Also, 'eof' isn't a good choice of name. 'len' would be better
were it not already taken:-/
I notice you removed the stuff that clears holes in the page to be written. Is
this is now done by the caller?
I notice also that you use afs_fill_page() in place of afs_prepare_page() to
prepare a page. You can't do this if the region to be filled currently lies
beyond the server's idea of EOF.
I'll try and get a look at fixing this patch tomorrow.
David
next prev parent reply other threads:[~2007-11-12 15:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-12 7:12 [rfc][patches] remove ->prepare_write Nick Piggin
2007-11-12 7:13 ` [rfc][patch 1/5] ecryptfs new aops Nick Piggin
2007-11-12 7:14 ` [rfc][patch 2/5] cifs: " Nick Piggin
2007-11-12 7:14 ` [rfc][patch 3/5] afs: " Nick Piggin
2007-11-12 7:20 ` [rfc][patch 4/5] rd: rewrite rd Nick Piggin
2007-11-12 7:23 ` [rfc][patch 5/5] remove prepare_write Nick Piggin
2007-11-12 15:29 ` David Howells [this message]
2007-11-13 0:15 ` [rfc][patch 3/5] afs: new aops Nick Piggin
2007-11-13 0:30 ` David Howells
2007-11-13 0:44 ` Nick Piggin
2007-11-13 10:56 ` David Howells
2007-11-14 4:24 ` Nick Piggin
2007-11-14 12:18 ` David Howells
2007-11-14 15:18 ` Nick Piggin
2007-11-14 15:57 ` David Howells
2007-11-14 21:32 ` Nick Piggin
2007-11-15 12:15 ` David Howells
2007-11-15 21:37 ` 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=6161.1194881354@redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mhalcrow@us.ibm.com \
--cc=npiggin@suse.de \
--cc=phillip@hellewell.homeip.net \
--cc=sfrench@samba.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).