Re: Libata-tj-stable patch /w sil3124 and PMP... 'device or resource busy'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Windisch wrote:
Can you post the result of 'dmesg'

Attached as dmesg.log

'cat /proc/mounts' and

Attached as proc.mounts.txt


'fuser -v /dev/sdX#'?

root@san001:~# fuser -v /dev/sda1
root@san001:~# fuser -v /dev/sdb1
root@san001:~# fuser -v /dev/sdc1
root@san001:~# fuser -v /dev/sdd1
root@san001:~# fuser -v /dev/sde1
root@san001:~# fuser -v /dev/sde
root@san001:~# fuser -v /dev/sdd
root@san001:~# fuser -v /dev/sdc
root@san001:~# fuser -v /dev/sdb
root@san001:~# fuser -v /dev/sda
root@san001:~# fuser -v /dev/sd*
root@san001:~#

And for good measure...

root@san001:~# lsof /dev/sd*
root@san001:~#

Can you apply the attached patch and report what the kernel says?

Thanks.

--
tejun
diff --git a/fs/block_dev.c b/fs/block_dev.c
index f5958f4..c4fae17 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -452,16 +452,23 @@ int bd_claim(struct block_device *bdev, 
 	/* first decide result */
 	if (bdev->bd_holder == holder)
 		res = 0;	 /* already a holder */
-	else if (bdev->bd_holder != NULL)
+	else if (bdev->bd_holder != NULL) {
+		printk("XXX bd_claim %d:%d failed %d@%p\n",
+		       MAJOR(bdev->bd_dev), MINOR(bdev->bd_dev),
+		       bdev->bd_holders, bdev->bd_holder);
 		res = -EBUSY; 	 /* held by someone else */
+	}
 	else if (bdev->bd_contains == bdev)
 		res = 0;  	 /* is a whole device which isn't held */
 
 	else if (bdev->bd_contains->bd_holder == bd_claim)
 		res = 0; 	 /* is a partition of a device that is being partitioned */
-	else if (bdev->bd_contains->bd_holder != NULL)
+	else if (bdev->bd_contains->bd_holder != NULL) {
+		printk("XXX bd_claim %d:%d failed %d@%p (part of a held dev)\n",
+		       MAJOR(bdev->bd_dev), MINOR(bdev->bd_dev),
+		       bdev->bd_holders, bdev->bd_holder);
 		res = -EBUSY;	 /* is a partition of a held device */
-	else
+	} else
 		res = 0;	 /* is a partition of an un-held device */
 
 	/* now impose change */
@@ -474,6 +481,14 @@ int bd_claim(struct block_device *bdev, 
 		bdev->bd_contains->bd_holder = bd_claim;
 		bdev->bd_holders++;
 		bdev->bd_holder = holder;
+		printk("XXX bd_claim %d:%d/%d:%d %d@%p %d@%p\n",
+		       MAJOR(bdev->bd_dev), MINOR(bdev->bd_dev),
+		       MAJOR(bdev->bd_contains->bd_dev),
+		       MINOR(bdev->bd_contains->bd_dev),
+		       bdev->bd_holders, bdev->bd_holder,
+		       bdev->bd_contains->bd_holders,
+		       bdev->bd_contains->bd_holder);
+		dump_stack();
 	}
 	spin_unlock(&bdev_lock);
 	return res;
@@ -484,6 +499,12 @@ EXPORT_SYMBOL(bd_claim);
 void bd_release(struct block_device *bdev)
 {
 	spin_lock(&bdev_lock);
+	printk("XXX bd_release %d:%d/%d:%d %d@%p %d@%p\n",
+	       MAJOR(bdev->bd_dev), MINOR(bdev->bd_dev),
+	       MAJOR(bdev->bd_contains->bd_dev),
+	       MINOR(bdev->bd_contains->bd_dev),
+	       bdev->bd_holders, bdev->bd_holder,
+	       bdev->bd_contains->bd_holders, bdev->bd_contains->bd_holder);
 	if (!--bdev->bd_contains->bd_holders)
 		bdev->bd_contains->bd_holder = NULL;
 	if (!--bdev->bd_holders)

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux