This looks mostly good, except we can introduce this extra conditional: If offsets presented by the backend filesystem are already fitting within the lower 64-log(servers) bits [which happens to be true with XFS for e.g], then we continue the current approach of transformation as it permits arbitrary seekdir(). The &quot;FUSE&quot; approach here will only permit seekdir(0), and seekdir(random) will be broken. This would show up on the day we encounter that first application we performs seekdir(random) on a directory FD.<div>
<br></div><div>As Ric was mentioning, we can check this with a systemtap script on a busy system to trap any seekdir call with a non-0 parameter and confirm. However if we do find an application which relies upon that behavior, we can implement a cookie cache and return virtual (short lived, for the life of the fd) d_offs and map them to server+physical_d_off in the cache.<div>
<br></div><div>I suggest we not invest time building this cache till we encounter that first application. In DHT since we will now be caching the subvolume count in the fd_ctx, we could also store the last presented cookie to the app and double check if the next requested offset is either 0 or matches the last presented value. If it did not, then return EOF, and declare we have encountered that first app :-)<div>
<br></div><div>Avati<br><br><div class="gmail_quote">On Thu, Jul 12, 2012 at 2:50 AM, Shishir Gowda <span dir="ltr">&lt;<a href="mailto:sgowda@redhat.com" target="_blank">sgowda@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi All,<br>
<br>
Starting a thread to discuss the fixes for handling offsets being 64bit in ext4.<br>
<br>
Please feel free to comment.<br>
<br>
DHT:<br>
<br>
1. Set the subvol count number in the xdata as part of readdirp response<br>
2. Do not modify the offset while sending a response<br>
3. If xdata has subvol count number as part of request, use it to identify the subvol to where call would go to<br>
4. If xdata does not have subvol count number, then start with subvol - 0.<br>
<br>
Remaining dht - readdir/p behaviour need not be changed.<br>
<br>
<br>
Fuse:<br>
1. save the subvolume count if available in the xdata in the fd_ctx<br>
2. When a readdir/p call is received on the same fd, send down the subvolume count as part of xdata<br>
<br>
NFS:<br>
1. Save the subvolume count in the verifier cookie, and pass it to the client<br>
2. Pass the verifier cookie down the graph if recieved.<br>
<br>
With regards,<br>
Shishir<br>
<br>
_______________________________________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@nongnu.org">Gluster-devel@nongnu.org</a><br>
<a href="https://lists.nongnu.org/mailman/listinfo/gluster-devel" target="_blank">https://lists.nongnu.org/mailman/listinfo/gluster-devel</a><br>
</blockquote></div><br></div></div></div>