Re: [PATCH 1/3] RFC quota: add generic quota error handlers.

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

 



> >> diff --git a/fs/quota/quota.c b/fs/quota/quota.c
> >> index 95388f9..ebdce30 100644
> >> --- a/fs/quota/quota.c
> >> +++ b/fs/quota/quota.c
> >> @@ -19,6 +19,41 @@
> >>  #include <linux/types.h>
> >>  #include <linux/writeback.h>
> >>  
> >> +static void quota_handle_error(struct super_block *sb)
> >> +{
> >> +
> >> +	set_bit(_DQUOT_ERROR, &sb_dqopt(sb)->flags);
> >> +	/* XXX: Currently it is no impossible to signall fs about error */
> >> +}
> >   I guess we can make all quota allocation and freeing functions to return
> > an error (EIO) if they spot some problem. That should be enough for a
> > filesystem to find out something is wrong...
> This result significant paradigm changes, because almost all fs-related
> syscalls result int quota alloc/free which return -EIO (i.e in almost
> unusable filesystem). Users with incorrect system-scripts will hate us
> for this.
  You're right, it's not so simple. But your notification function is IMHO
an overengineering. So I'd stick to passing the fact that quota is
probably corrupted via a function return value. We might use some less
"fatal" error code than EIO or even return a positive return value (because
usually quota operation itself happened just fine, we only spotted some quota
inconsistency). Then we have to update every filesystem using quotas to
count with the fact that quota functions can return such return value.
Probably have a simple wrapper for each filesystem for those 4 quota function
it calls which will filter-out the special return value and do whatever
else it wishes to do...
  Maybe if there are several filesystems that want to just ignore quota
corruption, we can create generic wrappers just filtering out the special
return value.

								Honza
-- 
Jan Kara <jack@xxxxxxx>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux