* delayed allocation blocks not flushed?
[not found] <51A31052.4030507@amplidata.com>
@ 2013-05-27 7:54 ` Bert De Jonghe
2013-05-27 20:35 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Bert De Jonghe @ 2013-05-27 7:54 UTC (permalink / raw)
To: linux-ext4; +Cc: Bastiaan Stougie
[-- Attachment #1: Type: text/plain, Size: 1076 bytes --]
Hi,
On an otherwise idle system, create an ext4 filesystem on /dev/sdi,
mount it and wait more than dirty_writeback_centisecs.
Then create a small file (echo something > file); wait
(dirty_expire_centisecs x 2), expect delayed_allocation_blocks to fall
to zero but it remains at 2 over here.
Create another small file (echo something_else > file2); again wait
(dirty_expire_centisecs x 2); check delayed_allocation_blocks which is
now at 4.
Wait a weekend more:
# date; cat /sys/fs/ext4/sdi/delayed_allocation_blocks
Fri May 24 15:33:21 UTC 2013
4
# date; cat /sys/fs/ext4/sdi/delayed_allocation_blocks
Mon May 27 07:14:30 UTC 2013
4
Doing a manual sync flushes out all blocks, also adding a sync after
mounting solves the not flushing behaviour (possible patch attached).
Has anyone noticed this before and is this expected behaviour? It looks
like these blocks are not flushed out to disk thus remain in memory and
will be lost upon power failure?
Please Cc on reply as we're not on the list.
Many thanks & best regards,
Bert.
[-- Attachment #2: sync_filesystem.patch --]
[-- Type: text/x-patch, Size: 217 bytes --]
--- fs/super.c.org 2013-05-22 09:45:55.061590168 +0200
+++ fs/super.c 2013-05-22 09:46:03.933589947 +0200
@@ -993,6 +993,7 @@
bdev->bd_super = s;
}
+ sync_filesystem(s);
return dget(s->s_root);
error_s:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: delayed allocation blocks not flushed?
2013-05-27 7:54 ` delayed allocation blocks not flushed? Bert De Jonghe
@ 2013-05-27 20:35 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2013-05-27 20:35 UTC (permalink / raw)
To: Bert De Jonghe; +Cc: linux-ext4, Bastiaan Stougie
Hello,
On Mon 27-05-13 09:54:13, Bert De Jonghe wrote:
> On an otherwise idle system, create an ext4 filesystem on /dev/sdi,
> mount it and wait more than dirty_writeback_centisecs.
What kernel version are you using?
> Then create a small file (echo something > file); wait
> (dirty_expire_centisecs x 2), expect delayed_allocation_blocks to
> fall to zero but it remains at 2 over here.
>
> Create another small file (echo something_else > file2); again wait
> (dirty_expire_centisecs x 2); check delayed_allocation_blocks which
> is now at 4.
>
> Wait a weekend more:
>
> # date; cat /sys/fs/ext4/sdi/delayed_allocation_blocks
> Fri May 24 15:33:21 UTC 2013
> 4
>
> # date; cat /sys/fs/ext4/sdi/delayed_allocation_blocks
> Mon May 27 07:14:30 UTC 2013
> 4
>
> Doing a manual sync flushes out all blocks, also adding a sync after
> mounting solves the not flushing behaviour (possible patch
> attached).
>
> Has anyone noticed this before and is this expected behaviour? It
> looks like these blocks are not flushed out to disk thus remain in
> memory and will be lost upon power failure?
This would be a bug. I have tried to recreate this with my 3.7.10 kernel
but I failed. File gets flushed to disk after 30s or so. What kernel
version are you using?
Also I don't see why syncing after mount would help to resolve the problem
that files are not flushed to disk in a timely manner...
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-27 20:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <51A31052.4030507@amplidata.com>
2013-05-27 7:54 ` delayed allocation blocks not flushed? Bert De Jonghe
2013-05-27 20:35 ` Jan Kara
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).