On Tue, Nov 30, 2010 at 7:50 PM, wchen <wchen@xxxxxxxxxxxxx> wrote: > hi, Sage, > > I'm reading the source code of ceph. Recently I'm very confused with > struct InodeCap's issued, implemented, wanted fields. I just have a > preliminary understanding of them, but what's the exact difference > between them? there are lots of code to reflect the relation between > them. Can you explain it for me? or any documents about it? Unfortunately we don't have a lot of documentation about the source code itself. Sage's thesis (which is available on the website) is the best resource, and does describe caps some. Briefly, caps are short for capabilities. They are issued by the MDS to clients to describe what the client is allowed to do with an inode and its associated file. There are capabilities to, for instance, let the client buffer writes, cache reads, and adjust certain kinds of metadata (mtime, et al). The wanted capabilities are caps the client wants but doesn't have. Issued caps are ones the client has been granted, and (IIRC) implemented caps are a subset of the issued caps describing which caps the client has actually made use of. It's useful for determining whether the client has dirty metadata and whatnot. :) -Greg -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html