* [PATCH] Cephfs Quota Support
@ 2014-01-21 12:55 Li Wang
0 siblings, 0 replies; only message in thread
From: Li Wang @ 2014-01-21 12:55 UTC (permalink / raw)
To: ceph-devel; +Cc: Sage Weil, Li Wang, Yunchuan Wen
This patch implements cephfs quota support.
Currently, the quota is implemented at directory level.
Some key designs behind,
1 Quota is get/set by extend attribute interfrace;
2 QuotaTree is used to buffer quota at client side,
and it is lazily reconstructed if directory hierarchy
changed;
3 Quota update is synchronized within mds cluster
by PolicyLock;
4 New rstat as well as quota are pushed to all related
clients by auth mds, prior to that, MGatherCaps message
is used to collect information of clients from other mds;
5 Quota is pushed to client within the reply to readdir
request;
6 Old mds without quota support is shut down;
7 Moving files across quota trees are forbidden if
quota enabled.
Review at:
https://github.com/ceph/ceph/pull/1122
Pull at:
https://github.com/kylinstorage/ceph.git wip-cephfs-quota
Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>
Signed-off-by: Li Wang <liwang@ubuntukylin.com>
---
Yunchuan Wen (25):
ceph: Add quota feature flags
ceph: Add quota_info_t to store quota info
mds: Add quota field to inode_t
mds: Shutdown old mds without quota support
mds: Handle quota update
ceph: Add MClientQuota message type
ceph: Add MGatherCaps message type
mds: Push quota info to client by MClientReply
mds: Export cap to auth mds when mds handle MGatherCaps
mds: Add broadcast_quota_to_client routine
mds: Push new rstat and quota info to client
client: Add class QuotaTree type
client: Add quota field to Inode
client: Get root's parents inode when mount -r used
client: Add quota config to config_opts.h
client: Add QuotaTree functions
client: Handle getxattr to show quota information
client: Handle listxattr to show quota and qstat attributes
client: Update qtree when fs tree changed
client: Handle MClientQuota to update quota information
client: Add helper for quota check
client: Enforce quota check when creating new file
client: Forbid moving files across quota trees
client: Enforce quota check when changing file size
client: Inform mds file size when approaching quota limit
src/ceph_mds.cc | 3 +-
src/client/Client.cc | 325 ++++++++++++++++++++++++++++++++++++++++---
src/client/Client.h | 9 ++
src/client/Inode.cc | 3 +
src/client/Inode.h | 79 +++++++++++
src/common/config_opts.h | 2 +
src/include/ceph_features.h | 2 +
src/include/ceph_fs.h | 1 +
src/mds/CInode.cc | 10 ++
src/mds/Capability.h | 1 +
src/mds/MDCache.cc | 40 ++++++
src/mds/MDCache.h | 1 +
src/mds/MDS.h | 3 +
src/mds/MDSMap.cc | 1 +
src/mds/MDSMap.h | 1 +
src/mds/Migrator.cc | 24 ++++
src/mds/Migrator.h | 3 +
src/mds/Server.cc | 71 +++++++++-
src/mds/Server.h | 1 +
src/mds/mdstypes.cc | 16 ++-
src/mds/mdstypes.h | 31 +++++
src/messages/MClientQuota.h | 50 +++++++
src/messages/MClientReply.h | 6 +
src/messages/MGatherCaps.h | 32 +++++
src/messages/Makefile.am | 2 +
src/msg/Message.cc | 8 ++
src/msg/Message.h | 1 +
27 files changed, 700 insertions(+), 26 deletions(-)
create mode 100644 src/messages/MClientQuota.h
create mode 100644 src/messages/MGatherCaps.h
--
1.7.9.5
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-01-21 12:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-21 12:55 [PATCH] Cephfs Quota Support Li Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox