From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Holden Karau" Subject: Re: [PATCH 1/1] fat: improve sync performance by grouping writes revised Date: Tue, 31 Oct 2006 13:10:42 -0500 Message-ID: References: <454765AC.1050905@xandros.com> <20061031163002.GC23021@wohnheim.fh-wedel.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: "Holden Karau" , "Josef Sipek" , hirofumi@mail.parknet.co.jp, linux-kernel@vger.kernel.org, "akpm@osdl.org" , linux-fsdevel@vger.kernel.org, "Nick Piggin" Return-path: Received: from ug-out-1314.google.com ([66.249.92.170]:53592 "EHLO ug-out-1314.google.com") by vger.kernel.org with ESMTP id S1423728AbWJaSKo convert rfc822-to-8bit (ORCPT ); Tue, 31 Oct 2006 13:10:44 -0500 Received: by ug-out-1314.google.com with SMTP id 32so1520427ugm for ; Tue, 31 Oct 2006 10:10:42 -0800 (PST) To: "=?ISO-8859-1?Q?J=F6rn_Engel?=" In-Reply-To: <20061031163002.GC23021@wohnheim.fh-wedel.de> Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 10/31/06, J=F6rn Engel wrote: > On Tue, 31 October 2006 10:03:08 -0500, Holden Karau wrote: > > +static int fat_mirror_bhs_optw(struct super_block *sb, struct buff= er_head **bhs, > > + int nr_bhs , int wait) > > { > > struct msdos_sb_info *sbi =3D MSDOS_SB(sb); > > - struct buffer_head *c_bh; > > + struct buffer_head *c_bh[nr_bhs*(sbi->fats)]; > > Variable-sized array on the kernel-stack? That can easily explode in > your hands. Unless you are _very_ sure about the bounds, you should > do an explicit kmalloc. And if you were that sure, you could just as > well have an array with fixed size. > sbi->fats has a range of 2 to 4, but I suppose that might concievably change if someone decides they want a fat filesystem with a lot of backup FATs and modifies some other parts of the driver to support that. I'll change it to use kmalloc. > > + if (sb->s_flags & MS_SYNCHRONOUS ) > [...] > > + } > [...] > > + int nr_bhs ) > > Trailing whitespace in those lines. =2E.... oops. I'll fix that. > > J=F6rn > > -- > Prosperity makes friends, adversity tries them. > -- Publilius Syrus > - > To unsubscribe from this list: send the line "unsubscribe linux-fsdev= el" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > --=20 Cell: 613-276-1645 - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html