Why would anyone rewrite the last block of a file or a block device to `allocate'
space? Seriously -- would this extend the block device; or fill the space in
between instead of creating a hole? Drugs?
Lubomir Rintel <lkundrak@v3.sk>
--- netbsd-iscsi-20080207/src/disk.c.allocate 2008-10-03 23:56:16.000000000 +0200
+++ netbsd-iscsi-20080207/src/disk.c 2008-10-03 23:57:06.000000000 +0200
@@ -659,6 +659,7 @@
}
}
+#if 0
/* allocate some space for a disk/extent, using an lseek, read and write combination */
static int
de_allocate(disc_de_t *de, char *filename)
@@ -705,6 +706,7 @@
}
return 0;
}
+#endif
/* copy src to dst, of size `n' bytes, padding any extra with `pad' */
static void
@@ -803,10 +805,12 @@
iscsi_trace_error(__FILE__, __LINE__, "error opening \"%s\"\n", disks.v[disks.c].filename);
return -1;
}
+#if 0
if (!(tp->flags & TARGET_READONLY) && !allocate_space(tp)) {
iscsi_trace_error(__FILE__, __LINE__, "error allocating space for \"%s\"", tp->target);
return -1;
}
+#endif
printf("%" PRIu64 " MB %sdisk storage for \"%s\"\n",
(de_getsize(&tp->de) / MB(1)),
(tp->flags & TARGET_READONLY) ? "readonly " : "",