Users were complaining about the warning in btrfs_log_parent_inode() because we''re returning -EEXIST. This warning is gone in another patch but it''s still making us commit a transaction when we don''t have to. Basically because we will log all csums in an ordered extent for an em we have the chance of logging the same csums multiple times. Since it''s not that big of a deal just allow csums to be over written in logs and that way we are safe. This gets rid of the EEXIST and we log like we normally would. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> --- fs/btrfs/file-item.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index bd38cef..93ddc2e 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c @@ -835,6 +835,13 @@ insert: ret = btrfs_insert_empty_item(trans, root, path, &file_key, ins_size); path->leave_spinning = 0; + + /* + * We can sometimes already have copied a csum into the log, that''s ok + * just overwrite it. + */ + if (root->objectid == BTRFS_TREE_LOG_OBJECTID && ret == -EEXIST) + ret = 0; if (ret < 0) goto fail_unlock; if (ret != 0) { -- 1.7.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html