All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Avishay Traeger <avishay@gmail.com>,
	Jeff Garzik <jeff@garzik.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Evgeniy Polyakov <zbr@ioremap.net>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	open-osd <osd-dev@open-osd.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Subject: Re: [PATCH 4/8] exofs: address_space_operations
Date: Sun, 22 Mar 2009 12:41:23 +0200	[thread overview]
Message-ID: <49C615D3.2020603@panasas.com> (raw)
In-Reply-To: <49C61157.6070604@gmail.com>

Marcin Slusarz wrote:
> Boaz Harrosh wrote:
>> (...)
>> +struct page_collect {
>> +	struct exofs_sb_info *sbi;
>> +	struct request_queue *req_q;
>> +	struct inode *inode;
>> +	unsigned expected_pages;
>> +
>> +	struct bio *bio;
>> +	unsigned nr_pages;
>> +	unsigned long length;
>> +	long pg_first;
>> +};
>> (...)
>> +int pcol_try_alloc(struct page_collect *pcol)
>> +{
>> +	int pages = min_t(unsigned, pcol->expected_pages, BIO_MAX_PAGES);
>> +
>> +	for (; pages; pages >>= 1) {
>> +		pcol->bio = bio_alloc(GFP_KERNEL, pages);
>> +		if (likely(pcol->bio))
>> +			return 0;
>> +	}
>> +
>> +	EXOFS_ERR("Failed to kcalloc expected_pages=%d\n",
> 
> %u
> 
>> +		  pcol->expected_pages);
>> +	return -ENOMEM;
>> +}
>> +
>> (...)
>> +static int __readpages_done(struct osd_request *or, struct page_collect *pcol,
>> +			    bool do_unlock)
>> +{
>> +	struct bio_vec *bvec;
>> +	int i;
>> +	u64 resid;
>> +	u64 good_bytes;
>> +	u64 length = 0;
>> +	int ret = exofs_check_ok_resid(or, &resid, NULL);
>> +
>> +	osd_end_request(or);
>> +
>> +	if (!ret)
>> +		good_bytes = pcol->length;
>> +	else if (ret && !resid)
>> +		good_bytes = 0;
>> +	else
>> +		good_bytes = pcol->length - resid;
> 
> Second ret check is not needed.
> 
>> (...)
>> +
>> +int read_exec(struct page_collect *pcol, bool is_sync)
> 
> read_exec is too generic name for globally visible symbol
> 
>> +{
>> (...)
>> +static void writepages_done(struct osd_request *or, void *p)
>> +{
>> +	struct page_collect *pcol = p;
>> +	struct bio_vec *bvec;
>> +	int i;
>> +	u64 resid;
>> +	u64  good_bytes;
>> +	u64  length = 0;
>> +
>> +	int ret = exofs_check_ok_resid(or, NULL, &resid);
>> +
>> +	osd_end_request(or);
>> +	atomic_dec(&pcol->sbi->s_curr_pending);
>> +
>> +	if (likely(!ret))
>> +		good_bytes = pcol->length;
>> +	else if (ret && !resid)
>> +		good_bytes = 0;
>> +	else
>> +		good_bytes = pcol->length - resid;
> 
> Ret check again.
> 
>> (...)
>> +
>> +int write_exec(struct page_collect *pcol)
> 
> Too generic name.
> 
>> (...)
> 

Right on all accounts. Thanks
will repost

Boaz


  reply	other threads:[~2009-03-22 10:43 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-18 17:45 [PATCHSET 0/8 version 4] exofs for kernel 2.6.30 Boaz Harrosh
2009-03-18 17:45 ` Boaz Harrosh
2009-03-18 17:57 ` [PATCH 1/8] exofs: Kbuild, Headers and osd utils Boaz Harrosh
2009-03-18 17:57 ` Boaz Harrosh
2009-03-31  8:04   ` Andrew Morton
2009-03-31  8:57     ` Boaz Harrosh
2009-03-18 17:58 ` [PATCH 2/8] exofs: file and file_inode operations Boaz Harrosh
2009-03-18 17:58   ` Boaz Harrosh
2009-03-31  8:04   ` Andrew Morton
2009-03-31  8:58     ` Boaz Harrosh
2009-03-18 18:01 ` [PATCH 3/8] exofs: symlink_inode and fast_symlink_inode operations Boaz Harrosh
2009-03-18 18:01   ` Boaz Harrosh
2009-03-18 18:04 ` [PATCH 4/8] exofs: address_space_operations Boaz Harrosh
2009-03-18 18:04   ` Boaz Harrosh
2009-03-22 10:22   ` Marcin Slusarz
2009-03-22 10:41     ` Boaz Harrosh [this message]
2009-03-22 13:58   ` [PATCH 4/8 ver5] " Boaz Harrosh
2009-03-22 13:58     ` Boaz Harrosh
2009-03-31  8:04     ` Andrew Morton
2009-03-31  9:04       ` Boaz Harrosh
2009-03-31 10:15         ` Andrew Morton
2009-03-31 10:27           ` Boaz Harrosh
2009-03-18 18:08 ` [PATCH 5/8] exofs: dir_inode and directory operations Boaz Harrosh
2009-03-18 18:08   ` Boaz Harrosh
2009-03-31  8:04   ` Andrew Morton
2009-03-31 10:22     ` Boaz Harrosh
2009-03-18 18:09 ` [PATCH 6/8] exofs: super_operations and file_system_type Boaz Harrosh
2009-03-18 18:09   ` Boaz Harrosh
2009-03-31  8:04   ` Andrew Morton
2009-03-31 10:29     ` Boaz Harrosh
2009-03-31 18:52     ` [osd-dev] " Benny Halevy
2009-04-01  8:05       ` Boaz Harrosh
2009-04-01  9:06         ` Benny Halevy
2009-03-18 18:10 ` [PATCH 7/8] exofs: Documentation Boaz Harrosh
2009-03-18 18:10   ` Boaz Harrosh
2009-03-21 13:26   ` Evgeniy Polyakov
2009-03-22  8:42     ` Boaz Harrosh
2009-03-18 18:11 ` [PATCH 8/8] fs: Add exofs to Kernel build Boaz Harrosh
2009-03-18 18:11 ` Boaz Harrosh
2009-03-23 13:06 ` [PATCHSET 0/8 version 4] exofs for kernel 2.6.30 Boaz Harrosh
2009-03-23 13:06   ` Boaz Harrosh
2009-03-24  9:07 ` Boaz Harrosh
2009-03-30 21:22 ` Andrew Morton
2009-03-31  3:01   ` Stephen Rothwell
2009-03-31  7:13     ` Evgeniy Polyakov
2009-03-31  7:20   ` Boaz Harrosh
2009-03-31  7:20     ` Boaz Harrosh
2009-03-31  7:41     ` Boaz Harrosh
2009-03-31  8:04       ` Andrew Morton
2009-04-01  9:23 ` Jeff Garzik
2009-04-01 11:21   ` Boaz Harrosh
2009-04-02  0:39     ` Jeff Garzik
2009-04-02 12:49       ` Boaz Harrosh
  -- strict thread matches above, loose matches on Subject: below --
2009-02-09 13:07 [PATCHSET 0/8 version 3] exofs Boaz Harrosh
2009-02-09 13:22 ` [PATCH 4/8] exofs: address_space_operations Boaz Harrosh

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=49C615D3.2020603@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=avishay@gmail.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=jeff@garzik.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcin.slusarz@gmail.com \
    --cc=osd-dev@open-osd.org \
    --cc=zbr@ioremap.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.