| 64 | using namespace std; |
| 65 | |
| 66 | void CInodeCommitOperation::update(ObjectOperation &op, inode_backtrace_t &bt) { |
| 67 | using ceph::encode; |
| 68 | |
| 69 | op.priority = priority; |
| 70 | op.create(false); |
| 71 | |
| 72 | bufferlist parent_bl; |
| 73 | encode(bt, parent_bl); |
| 74 | op.setxattr("parent", parent_bl); |
| 75 | |
| 76 | // for the old pool there is no need to update the layout and symlink |
| 77 | if (!update_layout_symlink) |
| 78 | return; |
| 79 | |
| 80 | bufferlist layout_bl; |
| 81 | encode(_layout, layout_bl, _features); |
| 82 | op.setxattr("layout", layout_bl); |
| 83 | |
| 84 | if (!_symlink.empty()) { |
| 85 | bufferlist symlink_bl; |
| 86 | encode(_symlink, symlink_bl); |
| 87 | op.setxattr("symlink", symlink_bl); |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | class CInodeIOContext : public MDSIOContextBase |
| 92 | { |