[Ocfs2-tools-devel] [PATCH 1/1] Ocfs2-tools: Add quota corruption codes to fswreck.

Tristan tristan.ye at oracle.com
Tue Oct 13 20:27:31 PDT 2009


Joel Becker wrote:
> On Fri, Oct 09, 2009 at 11:04:14AM +0800, Tristan Ye wrote:
>   
>> +void mess_up_quota(ocfs2_filesys *fs, enum fsck_type type, uint16_t slotnum)
>> +{
>> +	errcode_t ret;
>> +	int qtype;
>> +	char *buf;
>> +	int tree_depth = ocfs2_qtree_depth(fs->fs_blocksize);
>> +
>> +	struct ocfs2_disk_dqheader *header;
>> +	struct ocfs2_global_disk_dqblk *ddquot;
>> +	struct qt_disk_dqdbheader *dh;
>> +
>> +	ret = ocfs2_init_fs_quota_info(fs, USRQUOTA);
>> +	if (ret)
>> +		FSWRK_COM_FATAL(progname, ret);
>> +
>> +	ret = ocfs2_init_fs_quota_info(fs, GRPQUOTA);
>> +	if (ret)
>> +		FSWRK_COM_FATAL(progname, ret);
>>     
>
> 	I realize that you've already committed.  What if quota support
> isn't enabled on disk?  Are you expecting the user will just deal with
> the fatal error here?  That certainly works, but "No such file or
> directory" isn't quite as nice as "Hey, you can't do quota corruptions
> when quota isn't enabled!"
> 	We have the same problem with inline data.  We can do inline
> data corruptions even on a filesystem without the feature.  We just
> blatantly set i_dyn_features.  Should we be warning or erroring?
>   
You may mean the corruption code "INLINE_DATA_FLAG_INVALID", it just 
needs a 'noinline-data' volume, since our goal is to set i_dyn_features 
of an inode with OCFS2_INLINE_DATA_FL flag impolitely on a noinline-data 
volume for this corruption.

Tristan.

> Joel
>
>   




More information about the Ocfs2-tools-devel mailing list