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: "Josef Sipek" <jsipek@fsl.cs.sunysb.edu>,
	hirofumi@mail.parknet.co.jp, linux-kernel@vger.kernel.org,
	holdenk@xandros.com, "akpm@osdl.org" <akpm@osdl.org>,
	linux-fsdevel@vger.kernel.org, holden.karau@gmail.com
Subject: Re: [PATCH 1/1] fat: improve sync performance by grouping writes in fat_mirror_bhs [really unmangled]
Date: Fri, 27 Oct 2006 14:56:16 -0400	[thread overview]
Message-ID: <f46018bb0610271156p63e71eebg7992b99ec50ce005@mail.gmail.com> (raw)
In-Reply-To: <20061026153037.GB12596@wohnheim.fh-wedel.de>

Hi Jörn,

Thanks for your time, I'll make those changes [along with a few other
things I noticed while benchmarking it]. Before I put together a
patch, does anyone else see any obvious stuff I should clean up?

Cheers,

Holden :-)

On 10/26/06, Jörn Engel <joern@wohnheim.fh-wedel.de> wrote:
> I didn't pay too much attention, but found some low hanging fruits.
>
> On Thu, 26 October 2006 07:59:42 -0400, Holden Karau wrote:
> >
> > -/* FIXME: We can write the blocks as more big chunk. */
> >  static int fat_mirror_bhs(struct super_block *sb, struct buffer_head **bhs,
> > -                       int nr_bhs)
> > +                       int nr_bhs ) {
> > +  return fat_mirror_bhs_optw(sb , bhs , nr_bhs, 0);
> > +}
> > +
> > +static int fat_mirror_bhs_optw(struct super_block *sb, struct buffer_head **bhs,
> > +                            int nr_bhs , int wait)
>
> Does this compile without warnings?  Looks as if you should reverse
> the order of the two functions.
>
For some reason it compiles without warnings for me, but I'll switch the order.
> >  {
> >       struct msdos_sb_info *sbi = MSDOS_SB(sb);
> > -     struct buffer_head *c_bh;
> > +     struct buffer_head *c_bh[nr_bhs];
> >       int err, n, copy;
> >
> > +     /* Always wait if mounted -o sync */
> > +     if (sb->s_flags & MS_SYNCHRONOUS ) {
> > +       wait = 1;
> > +     }
>
> Coding style.  Use a tab for indentation and don't use braces for
> single-line conditional statements.
>
Sorry about that. A lot of the places where I used braces are because
I had some debugging output in there while I was hacking on it. I'll
change it.
> > +
> >       err = 0;
> > +     err = fat_sync_bhs_optw( bhs  , nr_bhs , wait);
>
> The err=0; is superfluous now, isn't it?
>
.... no comment :-)
> > +     if (err)
> > +       goto error;
>
> Indentation.
>
oops :-) I'll fix that.
> Jörn
>
> --
> Fantasy is more important than knowledge. Knowledge is limited,
> while fantasy embraces the whole world.
> -- Albert Einstein
>


-- 
Cell: 613-276-1645

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

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-26 11:59 [PATCH 1/1] fat: improve sync performance by grouping writes in fat_mirror_bhs [really unmangled] Holden Karau
2006-10-26 12:29 ` Nick Piggin
2006-10-27 18:55   ` Holden Karau
2006-10-26 15:30 ` Jörn Engel
2006-10-27 18:56   ` Holden Karau [this message]
2006-10-27 21:01 ` Josef Sipek

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=f46018bb0610271156p63e71eebg7992b99ec50ce005@mail.gmail.com \
    --to=holden@pigscanfly.ca \
    --cc=akpm@osdl.org \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=holden.karau@gmail.com \
    --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 \
    /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).