mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
quota: Allow negative usage of space and inodes
For clustered filesystems, it can happen that space / inode usage goes negative temporarily (because some node is allocating another node is freeing and they are not completely in sync). So let quota code allow this and change qsize_t so a signed type so that we don't underflow the variables. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
This commit is contained in:
parent
e3d4d56b97
commit
db49d2df48
2 changed files with 6 additions and 3 deletions
|
@ -168,7 +168,7 @@ enum {
|
|||
#include <asm/atomic.h>
|
||||
|
||||
typedef __kernel_uid32_t qid_t; /* Type in which we store ids in memory */
|
||||
typedef __u64 qsize_t; /* Type in which we store sizes */
|
||||
typedef long long qsize_t; /* Type in which we store sizes */
|
||||
|
||||
extern spinlock_t dq_data_lock;
|
||||
|
||||
|
@ -336,6 +336,7 @@ enum {
|
|||
* responsible for setting
|
||||
* S_NOQUOTA, S_NOATIME flags
|
||||
*/
|
||||
#define DQUOT_NEGATIVE_USAGE (1 << 7) /* Allow negative quota usage */
|
||||
|
||||
static inline unsigned int dquot_state_flag(unsigned int flags, int type)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue