Rename record in Changelog is different from other operations, it's split into
<div>two records: RNMFRM and RNMTO. This makes Changelog analysis hard</div><div>because these two records may not be consecutive and several renames</div><div>may occur at the same time.</div><div><br></div><div>I'm not clear why it's designed to be so, except that RNMTO is needed</div>
<div>because for DNE (distributed namespace) the rename target may reside on</div><div>another MDS, and a separate RNMTO record is needed. But even with this</div><div>it's fine to store all information in a RENME record, but leave the information of</div>
<div>whether rename removes the last hardlink of the target file (if it exists) in</div><div>RNMTO record.</div><div><br></div><div>I tried to add a field spfid in struct changelog_rec to store source parent fid,</div><div>
and pack both source (if has) and target names into record. Normally the</div><div>record size if sizeof(fid) larger than before, and it can be differentiated</div><div>according to version. The test result looks good, but I want to know whether</div>
<div>anyone oppose to this? If not, I'll make the change and make it changelog</div><div>version 2.</div><div><br></div><div>Cheers,</div><div>- Lai</div><div><br></div><div><br></div>