]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dm thin: cleanup and improve no space handling
authorMike Snitzer <snitzer@redhat.com>
Thu, 5 Dec 2013 21:03:33 +0000 (16:03 -0500)
committerMike Snitzer <snitzer@redhat.com>
Fri, 20 Dec 2013 23:15:16 +0000 (18:15 -0500)
commit15c2ed0c6a57efea75b2d2699827aeb74979a967
tree386bff93d8e9e6378a9eb1de8bc0957983ec298b
parent6f8fdf1824ac174f0eca0fb82595d50a58a335ae
dm thin: cleanup and improve no space handling

Factor out_of_data_space() out of alloc_data_block().  Eliminate the use
of 'no_free_space' as a latch in alloc_data_block() -- this is no longer
needed now that we switch to read-only mode when we run out of data or
metadata space.  In a later patch, the 'no_free_space' flag will be
eliminated entirely (in favor of checking metadata rather than relying
on a transient flag).

Move no metdata space handling into metdata_operation_failed().  Set
no_free_space when metadata space is exhausted too.  This is useful,
because it offers consistency, for the following patch that will requeue
data IOs if no_free_space.

Also, rename no_space() to retry_bios_on_resume().

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: Joe Thornber <ejt@redhat.com>
drivers/md/dm-thin.c