Re: [PATCH] Add extent conversion support to chattr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 12, 2008 at 03:17:13AM -0600, Andreas Dilger wrote:
> On Sep 12, 2008  14:34 +0530, Aneesh Kumar wrote:
> > -		_("Usage: %s [-RVf] [-+=AacDdijsSu] [-v version] files...\n"),
> > +		_("Usage: %s [-RVf] [-+=AacDdijsSue] [-v version] files...\n"),
> 
> Please keep options in alphabetical order.
> 
> > @@ -105,6 +105,7 @@ static const struct flags_char flags_array[] = {
> >  	{ EXT2_UNRM_FL, 'u' },
> >  	{ EXT2_NOTAIL_FL, 't' },
> >  	{ EXT2_TOPDIR_FL, 'T' },
> > +	{ EXT4_EXTENTS_FL, 'e'},
> 
> I'd also prefer to keep these in alphabetical order, which they almost are.
> 
> > @@ -199,7 +201,22 @@ static int change_attributes(const char * name)
> >  	if (set) {
> > +		if (extent_file && !(sf & EXT4_EXTENTS_FL)) {
> > +			if (!silent)
> > +				com_err(program_name, 0,
> > +				_("Clearing extent flag not supported on %s"),
> > +					name);
> > +			return -1;
> > +		}
> 
> Why not just try to set this flag and let the kernel decide what is
> possible?
> 

The motivation is to give a clear message that we still don't support
clearing extent flags. If we pass it to the kernel we will get
operation not supported error which would confuse the user who does
chattr -de f1

-aneesh
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux