linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Holden Karau" <holden@pigscanfly.ca>
To: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
Cc: "Holden Karau" <holdenk@xandros.com>,
	"Josef Sipek" <jsipek@fsl.cs.sunysb.edu>,
	hirofumi@mail.parknet.co.jp, linux-kernel@vger.kernel.org,
	"akpm@osdl.org" <akpm@osdl.org>,
	linux-fsdevel@vger.kernel.org,
	"Nick Piggin" <nickpiggin@yahoo.com.au>
Subject: Re: [PATCH 1/1] fat: improve sync performance by grouping writes revised
Date: Tue, 31 Oct 2006 13:10:42 -0500	[thread overview]
Message-ID: <f46018bb0610311010w4400dcb9n10eb872babd86cc1@mail.gmail.com> (raw)
In-Reply-To: <20061031163002.GC23021@wohnheim.fh-wedel.de>

On 10/31/06, Jörn Engel <joern@wohnheim.fh-wedel.de> wrote:
> On Tue, 31 October 2006 10:03:08 -0500, Holden Karau wrote:
> > +static int fat_mirror_bhs_optw(struct super_block *sb, struct buffer_head **bhs,
> > +                            int nr_bhs , int wait)
> >  {
> >       struct msdos_sb_info *sbi = 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.
..... oops. I'll fix that.
>
> Jörn
>
> --
> Prosperity makes friends, adversity tries them.
> -- Publilius Syrus
> -
> 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
>


-- 
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

  reply	other threads:[~2006-10-31 18:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-31 15:03 [PATCH 1/1] fat: improve sync performance by grouping writes revised Holden Karau
2006-10-31 16:28 ` Matthew Wilcox
2006-10-31 16:46   ` Holden Karau
2006-11-01  3:10     ` Holden Karau
2006-11-01 13:50       ` Matthew Wilcox
2006-10-31 16:30 ` Jörn Engel
2006-10-31 18:10   ` Holden Karau [this message]
2006-10-31 16:54 ` OGAWA Hirofumi
2006-10-31 18:46   ` Holden Karau
2006-10-31 20:23     ` OGAWA Hirofumi
2006-10-31 20:54       ` Holden Karau
2006-11-01  0:58         ` OGAWA Hirofumi
2006-11-01  2:33           ` Holden Karau

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=f46018bb0610311010w4400dcb9n10eb872babd86cc1@mail.gmail.com \
    --to=holden@pigscanfly.ca \
    --cc=akpm@osdl.org \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=holdenk@xandros.com \
    --cc=joern@wohnheim.fh-wedel.de \
    --cc=jsipek@fsl.cs.sunysb.edu \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    /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).