On 01/22/2013 01:52 PM, Ben Myers wrote: > Hey Brian, > > On Fri, Dec 07, 2012 at 03:49:56PM -0500, Brian Foster wrote: ... >> /* >> + * A quota failure can be represented as EDQUOT or ENOSPC in the case >> + * of project quotas. Check the quotas explicitly for low space >> + * conditions, run a prealloc scan if warranted and retry. Otherwise, >> + * proceed to general ENOSPC handling. >> + */ >> + if ((ret == -EDQUOT || ret == -ENOSPC) && !edquot) { >> + edquot = 1; >> + if (xfs_inode_free_quota_eofblocks(ip)) >> + goto write_retry; >> + } > > It looks like you have the iolock held across this call to free eofblocks. Is > it possible that this inode would already have some eofblocks, be tagged on the > radix tree, and you'd try to get the lock a second time? > Yeah, we're doing a SYNC_WAIT eofblocks scan here so it does seem to be a possibility. It looks like I should drop and reacquire the lock around the xfs_inode_free_quota_eofblocks() call. > I think you're right about XFS_IS_*QUOTA_ENFORCED. > > Neat patch! I wish we had a solid way to know which quota was enforced at this > level. Still, this is much better than trimming eofblocks on all inodes. > Thanks for reviewing. I agree on the quota bit, I figured this approach would be more appropriate than burying it in the reservation code, since the alternative is an error back to userspace. I'll plan to add the flush bits and polish this up. Brian > -Ben > _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs