From: Boaz Harrosh <bharrosh@panasas.com>
To: Benny Halevy <bhalevy@panasas.com>,
Trond Myklebust <Trond.Myklebust@netapp.com>,
NFS list <linux-nfs@vger.kernel.org>,
open-osd <osd-dev@open-osd.org>
Subject: [PATCH 3/8] SQUASHME: objio read/write patch: Bugs fixes
Date: Sun, 29 May 2011 13:30:28 +0300 [thread overview]
Message-ID: <1306665028-1033-1-git-send-email-bharrosh@panasas.com> (raw)
In-Reply-To: <4DE21CD5.8070907@panasas.com>
Cap BIO size it one page
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
---
fs/nfs/objlayout/objio_osd.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c
index 6925567..cc92d3b 100644
--- a/fs/nfs/objlayout/objio_osd.c
+++ b/fs/nfs/objlayout/objio_osd.c
@@ -397,7 +397,6 @@ int objio_alloc_io_state(struct pnfs_layout_segment *lseg,
const unsigned first_size = sizeof(*ios) +
objio_seg->num_comps * sizeof(ios->per_dev[0]);
- dprintk("%s: num_comps=%d\n", __func__, objio_seg->num_comps);
ios = kzalloc(first_size, gfp_flags);
if (unlikely(!ios))
return -ENOMEM;
@@ -561,6 +560,9 @@ static int _add_stripe_unit(struct objio_state *ios, unsigned *cur_pg,
unsigned bio_size = (ios->ol_state.nr_pages + pages_in_stripe) /
stripes;
+ if (BIO_MAX_PAGES_KMALLOC < bio_size)
+ bio_size = BIO_MAX_PAGES_KMALLOC;
+
per_dev->bio = bio_kmalloc(gfp_flags, bio_size);
if (unlikely(!per_dev->bio)) {
dprintk("Faild to allocate BIO size=%u\n", bio_size);
--
1.7.2.3
next prev parent reply other threads:[~2011-05-29 10:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-29 10:15 [PACHSET 0/8] FIXES for pnfs for 2.6.40 - version 9 Boaz Harrosh
2011-05-29 10:29 ` [PATCH 1/8] SQUASHME: into NFSv4.1: purge deviceid cache - let ver < 4.1 compile Boaz Harrosh
2011-05-29 10:30 ` [PATCH 2/8] SQUASHME V2: objio alloc/free lseg Bugs fixes Boaz Harrosh
2011-05-29 10:30 ` Boaz Harrosh [this message]
2011-05-29 10:30 ` [PATCH 4/8] NEWVERSION: pnfs-obj: report errors and .encode_layoutreturn Implementation Boaz Harrosh
2011-05-29 10:31 ` [PATCH 5/8] SQUASHME: Fix BUG in: NFSv4.1: unify pnfs_pageio_init functions Boaz Harrosh
2011-05-29 10:31 ` [PATCH 6/8] NFSv4.1: define nfs_generic_pg_test Boaz Harrosh
2011-05-29 10:31 ` [PATCH 7/8] SQUASHME: Move a check from nfs_pageio_do_add_request to nfs_generic_pg_test Boaz Harrosh
2011-05-29 17:30 ` Benny Halevy
2011-05-29 10:31 ` [PATCH 8/8] SQUASHME: pnfs-obj: objio_pg_test some checkpatch love 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=1306665028-1033-1-git-send-email-bharrosh@panasas.com \
--to=bharrosh@panasas.com \
--cc=Trond.Myklebust@netapp.com \
--cc=bhalevy@panasas.com \
--cc=linux-nfs@vger.kernel.org \
--cc=osd-dev@open-osd.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).