public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Mingming Cao <cmm@us.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Jan Kara <jack@suse.cz>, tytso <tytso@mit.edu>,
	linux-ext4 <linux-ext4@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH V5 3/5]ext4: quota handling for delayed allocation
Date: Tue, 6 Jan 2009 10:39:36 +0100	[thread overview]
Message-ID: <20090106093936.GF10705@duck.suse.cz> (raw)
In-Reply-To: <20090106093528.GE10705@duck.suse.cz>

On Tue 06-01-09 10:35:29, Jan Kara wrote:
> On Mon 05-01-09 20:40:55, Mingming Cao wrote:
> > ext4: quota reservation for delayed allocation
> > 
> > Uses quota reservation/claim/release to handle quota properly for delayed
> > allocation in the three steps: 1) quotas are reserved when data being copied
> > to cache when block allocation is defered 2) when new blocks are allocated.
> > reserved quotas are converted to the real allocated quota, 2) over-booked
> > quotas for metadata blocks are released back.
> > 
> > Signed-off-by: Mingming Cao <cmm@us.ibm.com>
>   The patch looks fine as far as I can tell :). But I'm not to familiar
> with the code so I won't add my Acked-by...
  On a second thought:

> > +unsigned long long ext4_get_reserved_space(struct inode *inode)
> > +{
> > +	unsigned long long total;
> > +
> > +	spin_lock(&EXT4_I(inode)->i_block_reservation_lock);
> > +	total = EXT4_I(inode)->i_reserved_data_blocks +
> > +		EXT4_I(inode)->i_reserved_meta_blocks;
> > +	spin_unlock(&EXT4_I(inode)->i_block_reservation_lock);
> > +
> > +	return total;
> > +}
  Shouldn't we return here (total << inode->i_blksize)? Quota expects
bytes as output...

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

  reply	other threads:[~2009-01-06  9:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-06  4:40 [PATCH V5 3/5]ext4: quota handling for delayed allocation Mingming Cao
2009-01-06  9:35 ` Jan Kara
2009-01-06  9:39   ` Jan Kara [this message]
2009-01-13  0:47     ` Mingming Cao
2009-01-13 15:09       ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090106093936.GF10705@duck.suse.cz \
    --to=jack@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=cmm@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox