Project

General

Profile

Actions

Bug #37378

closed

truncate_seq ordering issues with object creation

Added by Luis Henriques over 5 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

I'm seeing a bug with copy_file_range in recent clients. Here's a simple way to reproduce it:

# set files layouts
touch a b
setfattr -n ceph.file.layout -v "stripe_unit=65536 stripe_count=1 object_size=65536" a
setfattr -n ceph.file.layout -v "stripe_unit=65536 stripe_count=1 object_size=65536" b

# create 'a' and 'b' with 3 objects
xfs_io -f -c "pwrite -S 0x61 0       65536" a
xfs_io -f -c "pwrite -S 0x62 65536   65536" a
xfs_io -f -c "pwrite -S 0x63 131072  65536" a
xfs_io -f -c "pwrite -S 0x64 0      196608" b

# truncate 'b'
xfs_io -c "truncate 0" b
# copy 'a' into 'b'
xfs_io -c "copy_range -s 0 -d 0 -l 196608 a" b

at this point the contents of 'b' is:

hexdump b
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
0030000

If I write 'b' again with 'xfs_io -f -c "pwrite -S 0x64 0 196608" b' it's content is restored, but running the copy_range results again in a file with zeros.

Initially I thought this was a bug in the copy_file_range, but at this point it looks more an issue with the TRUNC operation, as the remote copy operation will always result in zero'ed objects. Could this be a MDS bug? Or OSD...?


Files

copy-from.patch (1.28 KB) copy-from.patch Luis Henriques, 11/29/2018 02:15 PM
0001-add-support-for-osd-copy-file-feature.patch (5.88 KB) 0001-add-support-for-osd-copy-file-feature.patch Kernel support for osd copy-file feature Luis Henriques, 04/02/2019 03:21 PM
Actions

Also available in: Atom PDF