I am writing a stackable file system which requires some database file. I am thinking of taking it as mount time argument and then reading it's content into private field of superblock of mounted FS. Precisely I intend to do this:

mount -t wrapfs -o pattdb=database.db /some/mounted/point /mount/point

Here I'm having problem in figuring out where does(in what field of FS does it reside) the file database.db go?

  • mount the thing /some/mounted/point to /mount/point as filesystem type wrapfs, and tell wrapfs to use the option pattdb=database.db. Refer to wrapfs' documentation for what that pattdb thing means. – Arthur2e5 Oct 29 '15 at 4:26
  • I don't understand the question. What do you mean by “field of FS”? – Gilles Oct 31 '15 at 23:13

Mount time argument with -o option is received in raw_data field of wrapper file system's mount function.

struct dentry *wrapfs_mount(struct file_system_type *fs_type, int flags,
            const char *dev_name, void *raw_data)

This function is defined in main.c and for the case above, raw_data points to string pattdb=database.db.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.