]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: actually limit the size of delalloc range
authorJosef Bacik <jbacik@fusionio.com>
Fri, 30 Aug 2013 18:38:49 +0000 (14:38 -0400)
committerChris Mason <chris.mason@fusionio.com>
Sat, 21 Sep 2013 15:05:24 +0000 (11:05 -0400)
commitf6e836876a64906a9e1f8972e3d1c09f0c6a0990
tree60f9f4d651c86c41b8168c67127091a168cc777d
parent0429068c0d1bf63fdd9b1e112fa14d41f6ea8b92
Btrfs: actually limit the size of delalloc range

So forever we have had this thing to limit the amount of delalloc pages we'll
setup to be written out to 128mb.  This is because we have to lock all the pages
in this range, so anything above this gets a bit unweildly, and also without a
limit we'll happily allocate gigantic chunks of disk space.  Turns out our check
for this wasn't quite right, we wouldn't actually limit the chunk we wanted to
write out, we'd just stop looking for more space after we went over the limit.
So if you do a giant 20gb dd on my box with lots of ram I could get 2gig
extents.  This is fine normally, except when you go to relocate these extents
and we can't find enough space to relocate these moster extents, since we have
to be able to allocate exactly the same sized extent to move it around.  So fix
this by actually enforcing the limit.  With this patch I'm no longer seeing
giant 1.5gb extents.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/extent_io.c