(no subject)

"James Olson" <[email protected]>
Newsgroups gmane.linux.ataraid
Organization Lycos. Inc.
Message-ID <20061101180510.HM.0000000000000DW@big_spender12.bos-mail-wwl14.lycos.com>
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
[email protected]
https://www.redhat.com/mailman/listinfo/ataraid-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.