linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bigalloc ENOSPC woes
@ 2012-01-30 21:19 Eric Sandeen
  2012-01-30 22:31 ` Ted Ts'o
  2012-01-31 16:03 ` Tao Ma
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Sandeen @ 2012-01-30 21:19 UTC (permalink / raw)
  To: ext4 development

I got nervous when I tried this on an -O bigalloc -C 65536 fs:

# echo foo > blah; du -hc blah; sync; du -hc blah
4.0K blah
4.0K total
64K blah
64K total

Seems that du should never report less than the cluster size, should it?

And that made me wonder about ENOSPC handling - are we tracing delalloc allocations correctly?

>From running xfstest 204 on a similarly-created fs, it really seems that we are not.

A manual test of creating 4-byte files until ENOSPC (which was really when I ran out of inodes) and then issuing a sync led to a storm of kernel messages about allocation failures:

[  482.154538] EXT4-fs (sdb6): delayed block allocation failed for inode 1664 at logical offset 0 with max blocks 1 with error -28
[  482.154540] EXT4-fs (sdb6): This should not happen!! Data will be lost

<ad infinitum, or at least 600 or so in my case>

and an end result of a bunch of 4 byte long files with no extents.  Almost like files full of NULLs.  Careful - that is hard to live down.  :)

Ted, are you aware of those issues in bigalloc?

-Eric

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

* Re: Bigalloc ENOSPC woes
  2012-01-30 21:19 Bigalloc ENOSPC woes Eric Sandeen
@ 2012-01-30 22:31 ` Ted Ts'o
  2012-01-31 16:03 ` Tao Ma
  1 sibling, 0 replies; 3+ messages in thread
From: Ted Ts'o @ 2012-01-30 22:31 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: ext4 development

On Mon, Jan 30, 2012 at 03:19:05PM -0600, Eric Sandeen wrote:
> I got nervous when I tried this on an -O bigalloc -C 65536 fs:
> 
> # echo foo > blah; du -hc blah; sync; du -hc blah
> 4.0K blah
> 4.0K total
> 64K blah
> 64K total
> 
> Seems that du should never report less than the cluster size, should it?

Yes, that seems like a bug.

> And that made me wonder about ENOSPC handling - are we tracing
> delalloc allocations correctly?
> 
> From running xfstest 204 on a similarly-created fs, it really seems
> that we are not....
> 
> Ted, are you aware of those issues in bigalloc?

No, this is news to me.  I'll have to take a closer look at this;
thanks for bring this up.

						- Ted

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

* Re: Bigalloc ENOSPC woes
  2012-01-30 21:19 Bigalloc ENOSPC woes Eric Sandeen
  2012-01-30 22:31 ` Ted Ts'o
@ 2012-01-31 16:03 ` Tao Ma
  1 sibling, 0 replies; 3+ messages in thread
From: Tao Ma @ 2012-01-31 16:03 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: ext4 development, Theodore Ts'o

On 01/31/2012 05:19 AM, Eric Sandeen wrote:
> I got nervous when I tried this on an -O bigalloc -C 65536 fs:
> 
> # echo foo > blah; du -hc blah; sync; du -hc blah
> 4.0K blah
> 4.0K total
> 64K blah
> 64K total
> 
> Seems that du should never report less than the cluster size, should it?
It is a bug and the corresponding fix is sent with the subject "ext4:
let getattr report the right blocks in delalloc+bigalloc."
> 
> And that made me wonder about ENOSPC handling - are we tracing delalloc allocations correctly?
> 
> From running xfstest 204 on a similarly-created fs, it really seems that we are not.
> 
> A manual test of creating 4-byte files until ENOSPC (which was really when I ran out of inodes) and then issuing a sync led to a storm of kernel messages about allocation failures:
> 
> [  482.154538] EXT4-fs (sdb6): delayed block allocation failed for inode 1664 at logical offset 0 with max blocks 1 with error -28
> [  482.154540] EXT4-fs (sdb6): This should not happen!! Data will be lost
> 
> <ad infinitum, or at least 600 or so in my case>
> 
> and an end result of a bunch of 4 byte long files with no extents.  Almost like files full of NULLs.  Careful - that is hard to live down.  :)
yeah, I can reproduce it easily and more investigation is needed here.

Thanks
Tao
> 
> Ted, are you aware of those issues in bigalloc?
> 
> -Eric
> --
> 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:[~2012-01-31 16:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-30 21:19 Bigalloc ENOSPC woes Eric Sandeen
2012-01-30 22:31 ` Ted Ts'o
2012-01-31 16:03 ` Tao Ma

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).