]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.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>
Tue, 7 Jan 2014 15:14:28 +0000 (10:14 -0500)
commit399caddfb16f5fa30c66056a32477cf95c947e2b
treec7afb7ccdaa87205419b3715bc18b5209efde61b
parent6f7f51d4344d530f725e9c932fa44f00ba363fa2
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