Re: [PATCH -v3] ext4: move quota initialization out of inode allocation transaction

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

 



On Fri 19-04-13 12:24:53, Ted Tso wrote:
> On Fri, Apr 19, 2013 at 04:30:28PM +0200, Jan Kara wrote:
> > > +	inode->i_flags |= S_NOQUOTA;
> > > +	dquot_drop(inode);
> >   The above two lines have to be swapped to preserve original ordering
> > which is actually important. Thanks.
> > 
> > >  	iput(inode);
> 
> OK.  I'm confused --- what is the function of the S_NOQUOTA flag here?
> I thought it was dquot_drop() which needed this magic flag set.  I can
> swap these two lines, but maybe we should add a comment somewhere
> about why this flag is needed and what the heck it's doing?  At this
> point, the use of this flag seems like total magic to me.  :-(
  S_NOQUOTA flag means for quota code: Don't touch this inode, don't
account this inode or it's blocks. So in the file creation path we are
setting it when we bail out before inode is actually accounted in quota
(so that we don't decrease used inode count when freeing the inode
without incrementing it). To make things simple, we also set the flag when
the inode was already accounted for, but we handle the quota cleanup
ourselves (see fail_free_drop label).

								Honza
-- 
Jan Kara <jack@xxxxxxx>
SUSE Labs, CR
--
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