From patchwork Tue May 24 15:10:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boaz Harrosh X-Patchwork-Id: 812572 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4OFB32x000784 for ; Tue, 24 May 2011 15:11:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753210Ab1EXPLC (ORCPT ); Tue, 24 May 2011 11:11:02 -0400 Received: from daytona.panasas.com ([67.152.220.89]:47017 "EHLO daytona.panasas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752695Ab1EXPLB (ORCPT ); Tue, 24 May 2011 11:11:01 -0400 Received: from fs2.bhalevy.com ([172.17.33.70]) by daytona.panasas.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 24 May 2011 11:11:00 -0400 From: Boaz Harrosh To: Benny Halevy , Trond Myklebust , NFS list Subject: [PATCH 12/12] SQUASHME: objio read/write patch: Bugs fixes Date: Tue, 24 May 2011 18:10:29 +0300 Message-Id: <1306249829-23523-1-git-send-email-bharrosh@panasas.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <4DDBC611.3050202@panasas.com> References: <4DDBC611.3050202@panasas.com> X-OriginalArrivalTime: 24 May 2011 15:11:00.0440 (UTC) FILETIME=[CA703D80:01CC1A24] 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 (demeter2.kernel.org [140.211.167.43]); Tue, 24 May 2011 15:11:04 +0000 (UTC) Cap BIO size it one page Signed-off-by: Boaz Harrosh --- fs/nfs/objlayout/objio_osd.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c index bc5aa46..06bc032 100644 --- a/fs/nfs/objlayout/objio_osd.c +++ b/fs/nfs/objlayout/objio_osd.c @@ -561,6 +561,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);