]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ceph: convert bools in ceph_mds_request to a new r_req_flags field
authorJeff Layton <jlayton@redhat.com>
Wed, 1 Feb 2017 18:49:09 +0000 (13:49 -0500)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 20 Feb 2017 11:16:08 +0000 (12:16 +0100)
commitbc2de10dc4da5036ada3381775bd966f0c21c603
tree5da0f735f7d5c87b23f7fef5e8fd135a39be12f7
parentf5a03b080450784e671998921feb62fd3846c953
ceph: convert bools in ceph_mds_request to a new r_req_flags field

Currently, we have a bunch of bool flags in struct ceph_mds_request. We
need more flags though, but each bool takes (at least) a byte. Those
add up over time.

Merge all of the existing bools in this struct into a single unsigned
long, and use the set/test/clear_bit macros to manipulate them. These
are atomic operations, but that is required here to prevent
load/modify/store races. The existing flags are protected by different
locks, so we can't rely on them for that purpose.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Yan, Zheng <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/debugfs.c
fs/ceph/dir.c
fs/ceph/inode.c
fs/ceph/mds_client.c
fs/ceph/mds_client.h