(no subject)

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

 



For some reason the file attachment didn't work right so I am resending with the patch as inline text.

Hello,
For those of you who experience the problem of a striped raid generating seek errors in the initial ramdisk image I have updated my patch to redhat nash for Fedora Core 6 which prevents the nash-mount command from probing drives when it is not supposed to (like when mounting the /proc filesystem).
-James

--- block.c.orig 2006-09-28 09:03:13.000000000 -0700
+++ block.c 2006-10-31 14:12:48.000000000 -0800
@@ -436,6 +436,31 @@ nashBdevIterNext(nashBdevIter iter, nash
return -1;
}

+static char *
+block_populate_cache(nashContext *c)
+{
+ nashBdevIter biter;
+ nashBdev dev = NULL;
+ blkid_dev bdev = NULL;
+
+ biter = nashBdevIterNew(c, "/sys/block");
+ while(nashBdevIterNext(biter, &dev) >= 0) {
+ char *dmname = NULL, *name = NULL;
+
+ if (!strncmp(dev->dev_path, "/dev/dm-", 8))
+ dmname = nashDmGetDevName(dev->devno);
+ name = dmname ? dmname : dev->dev_path;
+ bdev = blkid_get_dev(c->cache, name, BLKID_DEV_FIND);
+ if (dmname)
+ free(dmname);
+ if (!bdev)
+ continue;
+ }
+ nashBdevIterEnd(&biter);
+
+ return NULL;
+}
+
char *
nashFindDeviceByDevno(nashContext *c, dev_t devno)
{
@@ -510,7 +535,7 @@ nashFindFsByName(nashContext *c, const c

if (!access("/sys/block", F_OK)) {
/* populate the whole cache */
- block_find_fs_by_keyvalue(c, "unlikely","unlikely");
+ block_populate_cache(c);

/* now look our device up */
bdev = blkid_get_dev(c->cache, name, BLKID_DEV_NORMAL);
_______________________________________________
Ataraid-list mailing list
Ataraid-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ataraid-list

[Index of Archives]     [Linux RAID]     [Linux Device Mapper]     [Linux IDE]     [Linux SCSI]     [Kernel]     [Linux Books]     [Linux Admin]     [GFS]     [RPM]     [Yosemite Campgrounds]     [AMD 64]

  Powered by Linux