* [PATCH] ext4:fix unexpected error from ext4_reserve_global
@ 2007-06-14 15:29 Dmitriy Monakhov
2007-06-15 23:41 ` Mingming Cao
0 siblings, 1 reply; 3+ messages in thread
From: Dmitriy Monakhov @ 2007-06-14 15:29 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-ext4
I just cant belive my eyes then i saw this at the first time...
simple test: strace dd if=/dev/zero of=/mnt/file
open("/dev/zero", O_RDONLY) = 0
close(1) = 0
open("/mnt/test/file", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 1
read(0, "\0\0\0\0\0\0\0\0\0"..., 512) = 512
write(1, "\0\0\0\0\0\0\0\0"..., 512) = 512
read(0, "\0\0\0\0\0\0\0\0\0"..., 512) = 512
write(1, "\0\0\0\0\0\0\0\0"..., 512) = -1 ENOENT (No such fil
e or directory)
This strange error returned from ext4_reserve_global().
It's just typo because:
a) In fact this is 100% ENOSPC situation
b) simular function ext4_reserve_local() returns -ENOSPC
Signed-off-by: Dmitriy Monakhov <dmonakhov@openvz.org>
---
fs/ext4/balloc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index 4d7bfd2..43ae8f8 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -1920,7 +1920,7 @@ int ext4_reserve_global(struct super_block *sb, int blocks)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_reservation_slot *rs;
- int i, rc = -ENOENT;
+ int i, rc = -ENOSPC;
__u64 free = 0;
rs = sbi->s_reservation_slots;
--
1.5.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ext4:fix unexpected error from ext4_reserve_global
2007-06-14 15:29 [PATCH] ext4:fix unexpected error from ext4_reserve_global Dmitriy Monakhov
@ 2007-06-15 23:41 ` Mingming Cao
2007-06-19 6:05 ` Alex Tomas
0 siblings, 1 reply; 3+ messages in thread
From: Mingming Cao @ 2007-06-15 23:41 UTC (permalink / raw)
To: Dmitriy Monakhov; +Cc: linux-kernel, linux-ext4
On Thu, 2007-06-14 at 19:29 +0400, Dmitriy Monakhov wrote:
> I just cant belive my eyes then i saw this at the first time...
> simple test: strace dd if=/dev/zero of=/mnt/file
>
Thanks for reporting it.
> open("/dev/zero", O_RDONLY) = 0
> close(1) = 0
> open("/mnt/test/file", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 1
> read(0, "\0\0\0\0\0\0\0\0\0"..., 512) = 512
> write(1, "\0\0\0\0\0\0\0\0"..., 512) = 512
> read(0, "\0\0\0\0\0\0\0\0\0"..., 512) = 512
> write(1, "\0\0\0\0\0\0\0\0"..., 512) = -1 ENOENT (No such fil
> e or directory)
>
> This strange error returned from ext4_reserve_global().
> It's just typo because:
> a) In fact this is 100% ENOSPC situation
> b) simular function ext4_reserve_local() returns -ENOSPC
>
I agree.
Patch is put in ext4 patch queue. Alex if you can Ack, that would be
great.
Thanks,
Mingming
> Signed-off-by: Dmitriy Monakhov <dmonakhov@openvz.org>
> ---
> fs/ext4/balloc.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
> index 4d7bfd2..43ae8f8 100644
> --- a/fs/ext4/balloc.c
> +++ b/fs/ext4/balloc.c
> @@ -1920,7 +1920,7 @@ int ext4_reserve_global(struct super_block *sb, int blocks)
> {
> struct ext4_sb_info *sbi = EXT4_SB(sb);
> struct ext4_reservation_slot *rs;
> - int i, rc = -ENOENT;
> + int i, rc = -ENOSPC;
> __u64 free = 0;
>
> rs = sbi->s_reservation_slots;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ext4:fix unexpected error from ext4_reserve_global
2007-06-15 23:41 ` Mingming Cao
@ 2007-06-19 6:05 ` Alex Tomas
0 siblings, 0 replies; 3+ messages in thread
From: Alex Tomas @ 2007-06-19 6:05 UTC (permalink / raw)
To: cmm; +Cc: Dmitriy Monakhov, linux-kernel, linux-ext4
ACK, of course.
thanks, Alex
Mingming Cao wrote:
> On Thu, 2007-06-14 at 19:29 +0400, Dmitriy Monakhov wrote:
>> I just cant belive my eyes then i saw this at the first time...
>> simple test: strace dd if=/dev/zero of=/mnt/file
>>
> Thanks for reporting it.
>
>> open("/dev/zero", O_RDONLY) = 0
>> close(1) = 0
>> open("/mnt/test/file", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 1
>> read(0, "\0\0\0\0\0\0\0\0\0"..., 512) = 512
>> write(1, "\0\0\0\0\0\0\0\0"..., 512) = 512
>> read(0, "\0\0\0\0\0\0\0\0\0"..., 512) = 512
>> write(1, "\0\0\0\0\0\0\0\0"..., 512) = -1 ENOENT (No such fil
>> e or directory)
>>
>> This strange error returned from ext4_reserve_global().
>> It's just typo because:
>> a) In fact this is 100% ENOSPC situation
>> b) simular function ext4_reserve_local() returns -ENOSPC
>>
> I agree.
>
> Patch is put in ext4 patch queue. Alex if you can Ack, that would be
> great.
>
>
> Thanks,
>
> Mingming
>> Signed-off-by: Dmitriy Monakhov <dmonakhov@openvz.org>
>> ---
>> fs/ext4/balloc.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
>> index 4d7bfd2..43ae8f8 100644
>> --- a/fs/ext4/balloc.c
>> +++ b/fs/ext4/balloc.c
>> @@ -1920,7 +1920,7 @@ int ext4_reserve_global(struct super_block *sb, int blocks)
>> {
>> struct ext4_sb_info *sbi = EXT4_SB(sb);
>> struct ext4_reservation_slot *rs;
>> - int i, rc = -ENOENT;
>> + int i, rc = -ENOSPC;
>> __u64 free = 0;
>>
>> rs = sbi->s_reservation_slots;
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-06-19 6:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-14 15:29 [PATCH] ext4:fix unexpected error from ext4_reserve_global Dmitriy Monakhov
2007-06-15 23:41 ` Mingming Cao
2007-06-19 6:05 ` Alex Tomas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).