linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Eric Van Hensbergen <ericvh@gmail.com>
Cc: linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net
Subject: Re: [RFC] v9fs: readpage support
Date: Fri, 18 Nov 2005 19:20:45 +0000	[thread overview]
Message-ID: <20051118192045.GA5579@infradead.org> (raw)
In-Reply-To: <20051118002438.0BC995A807B@localhost.localdomain>

> +/*
> + * v9fs_vfs_readpage - read an entire page in from 9P
> + *
> + * @file: file being read 
> + * @page: structure to page
> + *
> + */

this isn't actually a valid kerneldoc comment, they start with /**
e.g.

/**
 * v9fs_vfs_readpage  -  read an entire page in from 9P
 * @file: file being read
 * @page: structure to page
 */

not that I think kerneldoc comments on implementations driver / fs API
methods are very useful in general..
 
> +	loff_t offset = ((loff_t) page->index) << PAGE_CACHE_SHIFT;

please use the page_offset() helper.

> +	struct v9fs_fcall *fcall = NULL;
> +	int fid = v9f->fid;
> +	int total = 0;
> +	int result = 0;
> +
> +	page_cache_get(page);

->readpage is synchronous, so you shouldn't need to grab a reference.

> +	if (PageError(page))
> +		ClearPageError(page);

this doesn't make a lot of sense.

> +	retval = 0;
> +
> +      Error:

labels always at positions zero or one please.  I'd call this out
instead of erorr aswell as it's used for the successfull completion
case aswell.

> diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
> index 89c849d..f332f65 100644
> --- a/fs/9p/vfs_file.c
> +++ b/fs/9p/vfs_file.c
> @@ -306,6 +306,9 @@ v9fs_file_write(struct file *filp, const
>  		total += result;
>  	} while (count);
>  
> +	if ((inode->i_mapping) && (inode->i_mapping->nrpages))
> +		invalidate_inode_pages2(inode->i_mapping);
> +

how could inode->i_mapping be zero here?  Also the parenthes around
those values are superflous.


  reply	other threads:[~2005-11-18 19:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-18  0:24 [RFC] v9fs: readpage support Eric Van Hensbergen
2005-11-18 19:20 ` Christoph Hellwig [this message]
2005-11-22 21:47   ` Eric Van Hensbergen

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=20051118192045.GA5579@infradead.org \
    --to=hch@infradead.org \
    --cc=ericvh@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=v9fs-developer@lists.sourceforge.net \
    /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).