All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] e2fsck: properly account cluster size
@ 2018-02-12 12:00 Artem Blagodarenko
  2018-02-15 14:45 ` Благодаренко Артём
  0 siblings, 1 reply; 3+ messages in thread
From: Artem Blagodarenko @ 2018-02-12 12:00 UTC (permalink / raw)
  To: linux-ext4; +Cc: Andrew Perepechko

From: Andrew Perepechko <anserper@ya.ru>

The patch fixes the quota_data_add() call so that
not num_blocks * block_size is passed, but instead
num_blocks * blocks_per_cluster * block_size.

Otherwise, any trivial test with -O bigalloc,quota
filesystem leads to check errors like

[QUOTA WARNING] Usage inconsistent for ID 0:actual (8192, 2) != expected
(131072, 2)
Update quota info for quota type 0<y>? cancelled!
[QUOTA WARNING] Usage inconsistent for ID 0:actual (8192, 2) != expected
(131072, 2)
Update quota info for quota type 1<y>? cancelled!

Cray-bug-id: LUS-5373

Signed-off-by: Andrew Perepechko <anserper@ya.ru>
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@gmail.com>
---
 e2fsck/pass1.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c
index 5015d938..471162ea 100644
--- a/e2fsck/pass1.c
+++ b/e2fsck/pass1.c
@@ -3387,6 +3387,8 @@ static void check_blocks(e2fsck_t ctx, struct problem_context *pctx,
 		}
 	}
 
+	pb.num_blocks *= EXT2FS_CLUSTER_RATIO(fs);
+
 	if (ino != quota_type2inum(PRJQUOTA, fs->super) &&
 	    (ino == EXT2_ROOT_INO || ino >= EXT2_FIRST_INODE(ctx->fs->super)) &&
 	    !(inode->i_flags & EXT4_EA_INODE_FL)) {
-- 
2.14.3 (Apple Git-98)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] e2fsck: properly account cluster size
  2018-02-12 12:00 [PATCH] e2fsck: properly account cluster size Artem Blagodarenko
@ 2018-02-15 14:45 ` Благодаренко Артём
  2018-02-15 18:41   ` Theodore Ts'o
  0 siblings, 1 reply; 3+ messages in thread
From: Благодаренко Артём @ 2018-02-15 14:45 UTC (permalink / raw)
  To: linux-ext4; +Cc: Andrew Perepechko

Sorry, this patch is duplicate of
[PATCH] e2fsck: fix quota accounting to use cluster units
from Eric W at 5 April.


> On 12 Feb 2018, at 15:00, Artem Blagodarenko <artem.blagodarenko@gmail.com> wrote:
> 
> From: Andrew Perepechko <anserper@ya.ru>
> 
> The patch fixes the quota_data_add() call so that
> not num_blocks * block_size is passed, but instead
> num_blocks * blocks_per_cluster * block_size.
> 
> Otherwise, any trivial test with -O bigalloc,quota
> filesystem leads to check errors like
> 
> [QUOTA WARNING] Usage inconsistent for ID 0:actual (8192, 2) != expected
> (131072, 2)
> Update quota info for quota type 0<y>? cancelled!
> [QUOTA WARNING] Usage inconsistent for ID 0:actual (8192, 2) != expected
> (131072, 2)
> Update quota info for quota type 1<y>? cancelled!
> 
> Cray-bug-id: LUS-5373
> 
> Signed-off-by: Andrew Perepechko <anserper@ya.ru>
> Signed-off-by: Artem Blagodarenko <artem.blagodarenko@gmail.com>
> ---
> e2fsck/pass1.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c
> index 5015d938..471162ea 100644
> --- a/e2fsck/pass1.c
> +++ b/e2fsck/pass1.c
> @@ -3387,6 +3387,8 @@ static void check_blocks(e2fsck_t ctx, struct problem_context *pctx,
> 		}
> 	}
> 
> +	pb.num_blocks *= EXT2FS_CLUSTER_RATIO(fs);
> +
> 	if (ino != quota_type2inum(PRJQUOTA, fs->super) &&
> 	    (ino == EXT2_ROOT_INO || ino >= EXT2_FIRST_INODE(ctx->fs->super)) &&
> 	    !(inode->i_flags & EXT4_EA_INODE_FL)) {
> -- 
> 2.14.3 (Apple Git-98)
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] e2fsck: properly account cluster size
  2018-02-15 14:45 ` Благодаренко Артём
@ 2018-02-15 18:41   ` Theodore Ts'o
  0 siblings, 0 replies; 3+ messages in thread
From: Theodore Ts'o @ 2018-02-15 18:41 UTC (permalink / raw)
  To: Благодаренко
	Артём
  Cc: linux-ext4, Andrew Perepechko

On Thu, Feb 15, 2018 at 05:45:34PM +0300, Благодаренко Артём wrote:
> Sorry, this patch is duplicate of
> [PATCH] e2fsck: fix quota accounting to use cluster units
> from Eric W at 5 April.

... and which is e2fsprogs 1.43.5 and newer....

    	      	 	   	      - Ted

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-15 18:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-12 12:00 [PATCH] e2fsck: properly account cluster size Artem Blagodarenko
2018-02-15 14:45 ` Благодаренко Артём
2018-02-15 18:41   ` Theodore Ts'o

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.