[Lustre-devel] rename in Changelog

Lai Siyao laisiyao at whamcloud.com
Wed Apr 25 00:05:46 PDT 2012

Rename record in Changelog is different from other operations, it's split
two records: RNMFRM and RNMTO. This makes Changelog analysis hard
because these two records may not be consecutive and several renames
may occur at the same time.

I'm not clear why it's designed to be so, except that RNMTO is needed
because for DNE (distributed namespace) the rename target may reside on
another MDS, and a separate RNMTO record is needed. But even with this
it's fine to store all information in a RENME record, but leave the
information of
whether rename removes the last hardlink of the target file (if it exists)
RNMTO record.

I tried to add a field spfid in struct changelog_rec to store source parent
and pack both source (if has) and target names into record. Normally the
record size if sizeof(fid) larger than before, and it can be differentiated
according to version. The test result looks good, but I want to know whether
anyone oppose to this? If not, I'll make the change and make it changelog
version 2.

- Lai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lustre.org/pipermail/lustre-devel-lustre.org/attachments/20120425/e2f038d1/attachment.htm>

More information about the lustre-devel mailing list