aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorLuis Henriques <[email protected]>2020-05-18 18:47:26 +0100
committerIlya Dryomov <[email protected]>2020-06-01 13:22:53 +0200
commit878dabb64117406abd40977b87544d05bb3031fc (patch)
tree6c09bf97a88e26af7393a745455d62971d5f5cd7 /tools/perf/scripts/python/export-to-sqlite.py
parent53ab8e7cd2d47594e68951994ac083d30f82fce4 (diff)
ceph: don't return -ESTALE if there's still an open file
Similarly to commit 03f219041fdb ("ceph: check i_nlink while converting a file handle to dentry"), this fixes another corner case with name_to_handle_at/open_by_handle_at. The issue has been detected by xfstest generic/467, when doing: - name_to_handle_at("/cephfs/myfile") - open("/cephfs/myfile") - unlink("/cephfs/myfile") - sync; sync; - drop caches - open_by_handle_at() The call to open_by_handle_at should not fail because the file hasn't been deleted yet (only unlinked) and we do have a valid handle to it. -ESTALE shall be returned only if i_nlink is 0 *and* i_count is 1. This patch also makes sure we have LINK caps before checking i_nlink. Signed-off-by: Luis Henriques <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Acked-by: Amir Goldstein <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions