|
Lines 45-50
Link Here
|
| 45 |
|
45 |
|
| 46 |
#include "zfsimpl.c" |
46 |
#include "zfsimpl.c" |
| 47 |
|
47 |
|
|
|
48 |
/* |
| 49 |
* For GPT this should be 128 but leads to 50+ second delay in BTX loader so |
| 50 |
* we use the original 4 pre r198420 by default for the boot process |
| 51 |
*/ |
| 52 |
#define ZFS_MAX_SLICES 4 |
| 53 |
|
| 48 |
static int zfs_open(const char *path, struct open_file *f); |
54 |
static int zfs_open(const char *path, struct open_file *f); |
| 49 |
static int zfs_write(struct open_file *f, void *buf, size_t size, size_t *resid); |
55 |
static int zfs_write(struct open_file *f, void *buf, size_t size, size_t *resid); |
| 50 |
static int zfs_close(struct open_file *f); |
56 |
static int zfs_close(struct open_file *f); |
|
Lines 415-421
Link Here
|
| 415 |
if (vdev_probe(vdev_read, (void*) (uintptr_t) fd, 0)) |
421 |
if (vdev_probe(vdev_read, (void*) (uintptr_t) fd, 0)) |
| 416 |
close(fd); |
422 |
close(fd); |
| 417 |
|
423 |
|
| 418 |
for (slice = 1; slice <= 128; slice++) { |
424 |
for (slice = 1; slice <= ZFS_MAX_SLICES; slice++) { |
| 419 |
sprintf(devname, "disk%dp%d:", unit, slice); |
425 |
sprintf(devname, "disk%dp%d:", unit, slice); |
| 420 |
fd = open(devname, O_RDONLY); |
426 |
fd = open(devname, O_RDONLY); |
| 421 |
if (fd == -1) { |
427 |
if (fd == -1) { |