diff options
author | Jan Kara <jack@suse.cz> | 2008-08-25 13:56:50 -0400 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2009-01-05 11:40:23 -0500 |
commit | 9e33d69f553aaf11377307e8d6f82deb3385e351 (patch) | |
tree | ded5f48f6cf82db976f30d5f0f4d44b941f60f44 /fs/ocfs2/ocfs2_lockid.h | |
parent | bbbd0eb34bf801dee01e345785959a75258f6567 (diff) |
ocfs2: Implementation of local and global quota file handling
For each quota type each node has local quota file. In this file it stores
changes users have made to disk usage via this node. Once in a while this
information is synced to global file (and thus with other nodes) so that
limits enforcement at least aproximately works.
Global quota files contain all the information about usage and limits. It's
mostly handled by the generic VFS code (which implements a trie of structures
inside a quota file). We only have to provide functions to convert structures
from on-disk format to in-memory one. We also have to provide wrappers for
various quota functions starting transactions and acquiring necessary cluster
locks before the actual IO is really started.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/ocfs2_lockid.h')
-rw-r--r-- | fs/ocfs2/ocfs2_lockid.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ocfs2/ocfs2_lockid.h b/fs/ocfs2/ocfs2_lockid.h index 82c200f7a8f1..eb6f50c9ceca 100644 --- a/fs/ocfs2/ocfs2_lockid.h +++ b/fs/ocfs2/ocfs2_lockid.h | |||
@@ -46,6 +46,7 @@ enum ocfs2_lock_type { | |||
46 | OCFS2_LOCK_TYPE_DENTRY, | 46 | OCFS2_LOCK_TYPE_DENTRY, |
47 | OCFS2_LOCK_TYPE_OPEN, | 47 | OCFS2_LOCK_TYPE_OPEN, |
48 | OCFS2_LOCK_TYPE_FLOCK, | 48 | OCFS2_LOCK_TYPE_FLOCK, |
49 | OCFS2_LOCK_TYPE_QINFO, | ||
49 | OCFS2_NUM_LOCK_TYPES | 50 | OCFS2_NUM_LOCK_TYPES |
50 | }; | 51 | }; |
51 | 52 | ||
@@ -77,6 +78,9 @@ static inline char ocfs2_lock_type_char(enum ocfs2_lock_type type) | |||
77 | case OCFS2_LOCK_TYPE_FLOCK: | 78 | case OCFS2_LOCK_TYPE_FLOCK: |
78 | c = 'F'; | 79 | c = 'F'; |
79 | break; | 80 | break; |
81 | case OCFS2_LOCK_TYPE_QINFO: | ||
82 | c = 'Q'; | ||
83 | break; | ||
80 | default: | 84 | default: |
81 | c = '\0'; | 85 | c = '\0'; |
82 | } | 86 | } |
@@ -95,6 +99,7 @@ static char *ocfs2_lock_type_strings[] = { | |||
95 | [OCFS2_LOCK_TYPE_DENTRY] = "Dentry", | 99 | [OCFS2_LOCK_TYPE_DENTRY] = "Dentry", |
96 | [OCFS2_LOCK_TYPE_OPEN] = "Open", | 100 | [OCFS2_LOCK_TYPE_OPEN] = "Open", |
97 | [OCFS2_LOCK_TYPE_FLOCK] = "Flock", | 101 | [OCFS2_LOCK_TYPE_FLOCK] = "Flock", |
102 | [OCFS2_LOCK_TYPE_QINFO] = "Quota", | ||
98 | }; | 103 | }; |
99 | 104 | ||
100 | static inline const char *ocfs2_lock_type_string(enum ocfs2_lock_type type) | 105 | static inline const char *ocfs2_lock_type_string(enum ocfs2_lock_type type) |