[dm-devel] [PATCH 1/2] Increase number of retries

Ritesh Raj Sarraf rrs at debian.org
Fri May 15 09:47:46 UTC 2015


There have been 3 bug reports so far, that claim increasing the number
of retries allows clean up of loop device

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=785251
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734794
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=608737

I can't be sure if this is the ideal number of retries, but for many
users it seems to have solved the error

Signed-off-by: Ritesh Raj Sarraf <rrs at debian.org>
---
 kpartx/lopart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kpartx/lopart.c b/kpartx/lopart.c
index 6f83048..fc1ff85 100644
--- a/kpartx/lopart.c
+++ b/kpartx/lopart.c
@@ -288,7 +288,7 @@ set_loop (const char *device, const char *file, int offset, int *loopro)
 extern int 
 del_loop (const char *device)
 {
-	int retries = 3;
+	int retries = 5;
 	int fd;
 
 	if ((fd = open (device, O_RDONLY)) < 0) {
-- 
2.1.4




More information about the dm-devel mailing list