<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.18.1">
</HEAD>
<BODY>
On Qua, 2008-05-28 at 18:54 +0400, Nikita Danilov wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
But that problem has to be solved anyway to implement per-user quotas
for ZFS, correct?
</PRE>
</BLOCKQUOTE>
<BR>
Indeed, but it's probably easier and more reliable to make the DMU itself update an internal quota/space accounting DMU object when a txg is syncing (updating internal objects during txg sync is something that the DMU already does, e.g., for spacemaps) than allow arbitrary modifications to a transaction group after it has been closed.<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
One possible solution I see is to use something like ZIL to log
operations in the context of current transaction group. This log can be
replayed during mount to update quota file.
</PRE>
</BLOCKQUOTE>
<BR>
Hmm.. I'm not sure if it would be easy to figure out during replay how many blocks were freed, especially considering things like snapshots, clones and deferred frees (if frees are making a txg sync to take too long to converge, the DMU will add them to a freelist object, instead of freeing them immediately).<BR>
<BR>
I agree that quotas could be implemented in Lustre (independent of the backend filesystem), but IMHO I think it would make more sense for the space accounting to be done in the DMU itself due to the complexities associated with it's internal behaviour.<BR>
<BR>
Regards,<BR>
Ricardo<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
--<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="450">
<TR>
<TD WIDTH="121" VALIGN="top">
<IMG SRC="cid:1211987133.4740.0.camel@localhost" ALIGN="bottom" BORDER="0">
</TD>
<TD WIDTH="329" VALIGN="top">
<B><FONT SIZE="1">Ricardo Manuel Correia</FONT></B><BR>
<FONT SIZE="1">Lustre Engineering</FONT><BR>
<BR>
<B><FONT SIZE="1">Sun Microsystems, Inc.</FONT></B><BR>
<FONT SIZE="1">Portugal</FONT><BR>
<FONT SIZE="1">Phone +351.214134023 / x58723</FONT><BR>
<FONT SIZE="1">Mobile +351.912590825</FONT><BR>
<FONT SIZE="1">Email <A HREF="mailto:Ricardo.M.Correia@Sun.COM">Ricardo.M.Correia@Sun.COM</A></FONT>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>