The following patch adds support for xattr retrieval via
CEPH_OSD_OP_GETXATTR. This allows for future RBD Persistent Reservation
support to implemented with state retained in an xattr on the RBD
header object.

RBD get/set/cmpset xattr functionality can be tested using the debug
DEVICE_ATTR patches found at:
https://git.samba.org/?p=ddiss/linux.git;a=shortlog;h=refs/heads/rbd_xattrs

E.g.
dracut:/# echo "key" > /sys/devices/rbd/0/getxattr
sh: echo: write error: No data available
dracut:/# echo "key val1" > /sys/devices/rbd/0/setxattr
dracut:/# echo "key" > /sys/devices/rbd/0/getxattr
[   95.842774] rbd: rbd0: key: val1
dracut:/# echo "key val1 val2" > /sys/devices/rbd/0/cmpsetxattr
dracut:/# echo "key" > /sys/devices/rbd/0/getxattr
[  129.868432] rbd: rbd0: key: val2
dracut:/# echo "key val1 val2" > /sys/devices/rbd/0/cmpsetxattr
sh: echo: write error: Operation canceled
dracut:/# echo "key val2 val3" > /sys/devices/rbd/0/cmpsetxattr
dracut:/# echo "key" > /sys/devices/rbd/0/getxattr
[  152.532082] rbd: rbd0: key: val3

Cheers, David
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to