public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext2: Mark the buffer as unmapped before reading the next quota block
@ 2009-02-02 10:04 Manish Katiyar
  2009-02-02 10:34 ` Jan Kara
  0 siblings, 1 reply; 3+ messages in thread
From: Manish Katiyar @ 2009-02-02 10:04 UTC (permalink / raw)
  To: Theodore Ts'o, ext4, Jan Kara, cmm; +Cc: mkatiyar

Hi Jan,

This is in continuation with the previous patch
(http://patchwork.ozlabs.org/patch/20275/) . We also need to set the
buffer as unmapped before reading the next block. I don't think quota
files can have holes, but atleast for correctness, otherwise once we
have read a block, tmp_bh is always mapped even for holes.


Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
---
 fs/ext2/super.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index da8bdea..b4e7633 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -1328,6 +1328,7 @@ static ssize_t ext2_quota_read(struct
super_block *sb, int type, char *data,
 				sb->s_blocksize - offset : toread;

 		tmp_bh.b_state = 0;
+		clear_buffer_mapped(&tmp_bh);
 		err = ext2_get_block(inode, blk, &tmp_bh, 0);
 		if (err < 0)
 			return err;
-- 
1.5.4.3


Thanks -
Manish

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

* Re: [PATCH] ext2: Mark the buffer as unmapped before reading the next quota block
  2009-02-02 10:04 [PATCH] ext2: Mark the buffer as unmapped before reading the next quota block Manish Katiyar
@ 2009-02-02 10:34 ` Jan Kara
  2009-02-02 11:05   ` Manish Katiyar
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kara @ 2009-02-02 10:34 UTC (permalink / raw)
  To: Manish Katiyar; +Cc: Theodore Ts'o, ext4, cmm

On Mon 02-02-09 15:34:27, Manish Katiyar wrote:
> Hi Jan,
> 
> This is in continuation with the previous patch
> (http://patchwork.ozlabs.org/patch/20275/) . We also need to set the
> buffer as unmapped before reading the next block. I don't think quota
> files can have holes, but atleast for correctness, otherwise once we
> have read a block, tmp_bh is always mapped even for holes.
> 
> 
> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
> ---
>  fs/ext2/super.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/ext2/super.c b/fs/ext2/super.c
> index da8bdea..b4e7633 100644
> --- a/fs/ext2/super.c
> +++ b/fs/ext2/super.c
> @@ -1328,6 +1328,7 @@ static ssize_t ext2_quota_read(struct
> super_block *sb, int type, char *data,
>  				sb->s_blocksize - offset : toread;
> 
>  		tmp_bh.b_state = 0;
> +		clear_buffer_mapped(&tmp_bh);
  I don't get this. When b_state is 0, then in particuler the buffer is not
mapped. So why clear the mapped bit explicitely?

>  		err = ext2_get_block(inode, blk, &tmp_bh, 0);
>  		if (err < 0)
>  			return err;

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

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

* Re: [PATCH] ext2: Mark the buffer as unmapped before reading the next quota block
  2009-02-02 10:34 ` Jan Kara
@ 2009-02-02 11:05   ` Manish Katiyar
  0 siblings, 0 replies; 3+ messages in thread
From: Manish Katiyar @ 2009-02-02 11:05 UTC (permalink / raw)
  To: Jan Kara; +Cc: Theodore Ts'o, ext4, cmm

On Mon, Feb 2, 2009 at 4:04 PM, Jan Kara <jack@suse.cz> wrote:
> On Mon 02-02-09 15:34:27, Manish Katiyar wrote:
>> Hi Jan,
>>
>> This is in continuation with the previous patch
>> (http://patchwork.ozlabs.org/patch/20275/) . We also need to set the
>> buffer as unmapped before reading the next block. I don't think quota
>> files can have holes, but atleast for correctness, otherwise once we
>> have read a block, tmp_bh is always mapped even for holes.
>>
>>
>> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
>> ---
>>  fs/ext2/super.c |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/fs/ext2/super.c b/fs/ext2/super.c
>> index da8bdea..b4e7633 100644
>> --- a/fs/ext2/super.c
>> +++ b/fs/ext2/super.c
>> @@ -1328,6 +1328,7 @@ static ssize_t ext2_quota_read(struct
>> super_block *sb, int type, char *data,
>>                               sb->s_blocksize - offset : toread;
>>
>>               tmp_bh.b_state = 0;
>> +             clear_buffer_mapped(&tmp_bh);
>  I don't get this. When b_state is 0, then in particuler the buffer is not
> mapped. So why clear the mapped bit explicitely?

Sorry for the noise.......my bad :-( !!

Thanks -
Manish

>
>>               err = ext2_get_block(inode, blk, &tmp_bh, 0);
>>               if (err < 0)
>>                       return err;
>
>                                                                        Honza
> --
> Jan Kara <jack@suse.cz>
> SUSE Labs, CR
>

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

end of thread, other threads:[~2009-02-02 11:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-02 10:04 [PATCH] ext2: Mark the buffer as unmapped before reading the next quota block Manish Katiyar
2009-02-02 10:34 ` Jan Kara
2009-02-02 11:05   ` Manish Katiyar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox