1

I have to use ext4 image file in btrfs, because Dropbox requires ext4 as file system. In fstab mount options I've set async, but I'm not sure about this.

What are the pros and cons of async and sync flags for a disk image? Which one is preferable?

I personally think that it is better to let host file system (btrfs in my case) handle handle sync by itself, so sync option is better. Am I right?

1
  • Please post the whole line from fstab you are talking about. Commented Aug 24, 2018 at 11:12

1 Answer 1

1

I personally think that it is better to let host FS (btrfs in my case) handle handle sync by itself, so sync ption is better. Am I right?

If I understand you correctly, then no :-). (But it's not entirely clear, and maybe you meant to write "async option is better", not "sync ption").

The loopback device (used for mounting filesystem images) respects sync requests, effectively converting them to fsync(). Then the underlying filesystem will convert these back to sync requests on the block device, or whatever. So even for a filesystem image, adding the sync option will make all writes fully synchronous (and hence slower).

Unless you have another reason, you can mount without these options and let it default to async. All fsync() requests inside the mounted image will be respected as normal.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.