linux-stable/include/linux/ceph
Luís Henriques d93231a6bc ceph: prevent a client from exceeding the MDS maximum xattr size
The MDS tries to enforce a limit on the total key/values in extended
attributes.  However, this limit is enforced only if doing a synchronous
operation (MDS_OP_SETXATTR) -- if we're buffering the xattrs, the MDS
doesn't have a chance to enforce these limits.

This patch adds support for decoding the xattrs maximum size setting that is
distributed in the mdsmap.  Then, when setting an xattr, the kernel client
will revert to do a synchronous operation if that maximum size is exceeded.

While there, fix a dout() that would trigger a printk warning:

[   98.718078] ------------[ cut here ]------------
[   98.719012] precision 65536 too large
[   98.719039] WARNING: CPU: 1 PID: 3755 at lib/vsprintf.c:2703 vsnprintf+0x5e3/0x600
...

Link: https://tracker.ceph.com/issues/55725
Signed-off-by: Luís Henriques <lhenriques@suse.de>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-08-03 00:54:12 +02:00
..
auth.h libceph: set global_id as soon as we get an auth ticket 2021-06-24 21:03:17 +02:00
buffer.h libceph: allow ceph_buffer_put() to receive a NULL ceph_buffer 2019-08-22 10:47:41 +02:00
ceph_debug.h
ceph_features.h libceph, ceph: get and handle cluster maps with addrvecs 2020-12-14 23:21:50 +01:00
ceph_frag.h
ceph_fs.h ceph: do not release the global snaprealm until unmounting 2022-03-01 18:26:37 +01:00
ceph_hash.h
cls_lock_client.h
debugfs.h libceph: drop CEPH_DEFINE_SHOW_FUNC 2020-03-30 12:42:40 +02:00
decode.h libceph, ceph: implement msgr2.1 protocol (crc and secure modes) 2020-12-14 23:21:50 +01:00
libceph.h ceph: move to a dedicated slabcache for ceph_cap_snap 2022-03-01 18:26:37 +01:00
mdsmap.h ceph: prevent a client from exceeding the MDS maximum xattr size 2022-08-03 00:54:12 +02:00
messenger.h libceph: optionally use bounce buffer on recv path in crc mode 2022-02-02 18:50:36 +01:00
mon_client.h libceph, rbd, ceph: "blacklist" -> "blocklist" 2020-10-12 15:29:26 +02:00
msgpool.h
msgr.h libceph: add __maybe_unused to DEFINE_MSGR2_FEATURE 2020-12-28 20:34:33 +01:00
osd_client.h libceph: fix potential use-after-free on linger ping and resends 2022-05-18 21:21:05 +02:00
osdmap.h libceph, ceph: get and handle cluster maps with addrvecs 2020-12-14 23:21:50 +01:00
pagelist.h
rados.h libceph, rbd, ceph: "blacklist" -> "blocklist" 2020-10-12 15:29:26 +02:00
string_table.h
striper.h
types.h