From patchwork Thu May 26 19:12:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boaz Harrosh X-Patchwork-Id: 821842 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4QJCUlU016471 for ; Thu, 26 May 2011 19:12:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758173Ab1EZTM3 (ORCPT ); Thu, 26 May 2011 15:12:29 -0400 Received: from daytona.panasas.com ([67.152.220.89]:37917 "EHLO daytona.panasas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757985Ab1EZTM3 (ORCPT ); Thu, 26 May 2011 15:12:29 -0400 Received: from fs2.bhalevy.com ([172.17.33.67]) by daytona.panasas.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 26 May 2011 15:12:28 -0400 Message-ID: <4DDEA620.2000908@panasas.com> Date: Thu, 26 May 2011 22:12:32 +0300 From: Boaz Harrosh User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110430 Remi/fc12 Thunderbird/3.1.10 MIME-Version: 1.0 To: Benny Halevy CC: Trond Myklebust , linux-nfs@vger.kernel.org Subject: [PATCH resend3] SQUASHME: objio read/write patch: Bugs fixes References: <4DDD7392.6040505@panasas.com> <1306358945-17555-1-git-send-email-bhalevy@panasas.com> In-Reply-To: <1306358945-17555-1-git-send-email-bhalevy@panasas.com> X-OriginalArrivalTime: 26 May 2011 19:12:28.0551 (UTC) FILETIME=[DADA0970:01CC1BD8] Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 26 May 2011 19:12:30 +0000 (UTC) Cap BIO size it one page Signed-off-by: Boaz Harrosh --- 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);