</listitem>
</varlistentry>
<varlistentry>
- <term><option>-t</option></term>
- <listitem>
- <para>Work with one file per block, in a hierarchical tree.
- This feature is useful to provide a virtual block device on an underlying
- filesystem that does not handle large files well, for example fuse/ftpfs, davfs
- or other network filesytems.
- </para>
- <para>
- <command>nbd-server</command> will search for files of the
- form
- <replaceable>exportname</replaceable>/<replaceable>TREEXXXX</replaceable>/.../<replaceable>FILEXXXX</replaceable>,
- with <replaceable>exportname</replaceable> being the
- filename that would otherwise have been used (after name
- transformation for virtualization, if any, has been
- performed) and <replaceable>TREEXXXX</replaceable> and
- <replaceable>FILEXXXX</replaceable> being autogenerated directory
- and path names for individual block files.
- </para>
- <para>
- Files and directories are automatically created.
- Files will be deleted if the corresponding block gets marked as unused.
- The size of the individual block files is fixed to 4096 bytes.
- There will be at most 1024 files/subdirectories per folder.
- An apropriate nesting level of subdirectories will be created to
- create a filesystem of <option>size</option> bytes in total
- forming a virtual block device.
- </para>
- <para>
- This feature is mutually exclusive with the
- <option>-m</option> and will take precedence if both are given.
- The <option>size</option> option <emphasis>must</emphasis> be specified when using this feature!
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
<term><option>-c</option></term>
<listitem>
<para>Copy on write. When this option is provided,
#define F_TEMPORARY 1024 /**< Whether the backing file is temporary and should be created then unlinked */
#define F_TRIM 2048 /**< Whether server wants TRIM (discard) to be sent by the client */
#define F_FIXED 4096 /**< Client supports fixed new-style protocol (and can thus send us extra options */
-#define F_TREEFILES 8192 /**< flag to tell us a file is exported using -t */
+#define F_TREEFILES 8192 /**< flag to tell us a file is exported using treefiles */
/** Global flags: */
#define F_OLDSTYLE 1 /**< Allow oldstyle (port-based) exports */
printf("Usage: [ip:|ip6@]port file_to_export [size][kKmM] [-l authorize_file] [-r] [-m] [-c] [-C configuration file] [-p PID file name] [-o section name] [-M max connections] [-V]\n"
"\t-r|--read-only\t\tread only\n"
"\t-m|--multi-file\t\tmultiple file\n"
- "\t-t|--tree-files\t\ttree of subdirectories with one file per block\n"
"\t-c|--copy-on-write\tcopy on write\n"
"\t-C|--config-file\tspecify an alternate configuration file\n"
"\t-l|--authorize-file\tfile with list of hosts that are allowed to\n\t\t\t\tconnect.\n"
struct option long_options[] = {
{"read-only", no_argument, NULL, 'r'},
{"multi-file", no_argument, NULL, 'm'},
- {"tree-files", no_argument, NULL, 't'},
{"copy-on-write", no_argument, NULL, 'c'},
{"dont-fork", no_argument, NULL, 'd'},
{"authorize-file", required_argument, NULL, 'l'},
serve=g_new0(SERVER, 1);
serve->authname = g_strdup(default_authname);
serve->virtstyle=VIRT_IPLIT;
- while((c=getopt_long(argc, argv, "-C:cdl:mto:rp:M:V", long_options, &i))>=0) {
+ while((c=getopt_long(argc, argv, "-C:cdl:mo:rp:M:V", long_options, &i))>=0) {
switch (c) {
case 1:
/* non-option argument */
case 'm':
serve->flags |= F_MULTIFILE;
break;
- case 't':
- serve->flags |= F_TREEFILES;
- break;
case 'o':
do_output = TRUE;
section_header = g_strdup(optarg);