[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20061220062842.GA2988@amitarora.in.ibm.com>
Date: Wed, 20 Dec 2006 11:58:42 +0530
From: "Amit K. Arora" <aarora@...ux.vnet.ibm.com>
To: Andreas Dilger <adilger@...sterfs.com>
Cc: linux-ext4@...r.kernel.org
Subject: Re: [RFC][Patch 1/2] Persistent preallocation in ext4
On Tue, Dec 19, 2006 at 02:12:06PM -0700, Andreas Dilger wrote:
> Minor edits (not worth a resubmit by itself):
Thanks, Andreas ! I will take care of these comments in the next
submission.
Regards,
Amit Arora
>
> On Dec 19, 2006 16:35 +0530, Amit K. Arora wrote:
> > + /* ext4_can_extents_be_merged should have checked that either
> > + * both extents are uninitialized, or both aren't. Thus we
> > + * need to check any of them here.
>
> s/any/only one/
>
> >
> > + case EXT4_IOC_PREALLOCATE: {
> > + if (IS_RDONLY(inode))
> > + return -EROFS;
> > +
> > + if (copy_from_user(&input,
> > + (struct ext4_falloc_input __user *) arg, sizeof(input)))
> > + return -EFAULT;
> > +
> > + if (input.len == 0)
> > + return -EINVAL;
> > +
> > + if (!(EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL))
> > + return -ENOTTY;
>
> May as well put this check before copy_from_user(), since it doesn't need
> the user data and is much faster to check first.
>
> > +retry:
> > + ret = 0;
> > + while(ret>=0 && ret<max_blocks)
> > + {
>
> Opening brace always on same line, like "while() {"
>
> > + if (ret == -ENOSPC && ext4_should_retry_alloc(inode->i_sb,
> > + &retries))
>
> &retries should be aligned with start of (inode->i_sb, on previous line.
>
> > + if(nblocks) {
>
> Space between "if (" everywhere.
>
> Cheers, Andreas
> --
> Andreas Dilger
> Principal Software Engineer
> Cluster File Systems, Inc.
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists