]>
Commit | Line | Data |
---|---|---|
f212f39a | 1 | The VFS union mount patches require some changes to util-linux and |
2 | e2fsprogs to support the union mount option and the ext2 whiteout | |
3 | feature flag. We are not submitting them for formal review at this | |
4 | time, but the patches are below for quick reference. They are also | |
5 | available in git repos linked to from the Union Mount HOWTO page: | |
6 | ||
7 | http://valerieaurora.org/union/ | |
8 | ||
9 | -VAL | |
10 | ||
11 | From: Valerie Aurora Henson <vaurora@redhat.com> | |
12 | Date: Sat, 21 Mar 2009 20:56:57 -0700 | |
13 | Subject: [PATCH 1/1] union mount patches from: | |
14 | ||
15 | ftp://ftp.suse.com/pub/people/jblunck/union-mount/util-linux-2.13-union_mount.diff | |
16 | --- | |
17 | mount/mount.c | 5 +++++ | |
18 | mount/mount_constants.h | 3 +++ | |
19 | 2 files changed, 8 insertions(+), 0 deletions(-) | |
20 | ||
4fa9d824 | 21 | diff --git a/mount-deprecated/mount.c b/mount-deprecated/mount.c |
f212f39a | 22 | index 9cbc466..9bf766b 100644 |
4fa9d824 AM |
23 | --- a/mount-deprecated/mount.c |
24 | +++ b/mount-deprecated/mount.c | |
f212f39a | 25 | @@ -138,6 +138,7 @@ static const struct opt_map opt_map[] = { |
26 | { "sync", 0, 0, MS_SYNCHRONOUS}, /* synchronous I/O */ | |
27 | { "async", 0, 1, MS_SYNCHRONOUS}, /* asynchronous I/O */ | |
28 | { "dirsync", 0, 0, MS_DIRSYNC}, /* synchronous directory modifications */ | |
29 | + { "union", 0, 0, MS_UNION }, /* Union mount */ | |
30 | { "remount", 0, 0, MS_REMOUNT}, /* Alter flags of mounted FS */ | |
31 | { "bind", 0, 0, MS_BIND }, /* Remount part of tree elsewhere */ | |
32 | { "rbind", 0, 0, MS_BIND|MS_REC }, /* Idem, plus mounted subtrees */ | |
33 | @@ -1638,6 +1639,7 @@ static struct option longopts[] = { | |
34 | { "make-rprivate", 0, 0, 142 }, | |
35 | { "make-runbindable", 0, 0, 143 }, | |
36 | { "no-canonicalize", 0, 0, 144 }, | |
37 | + { "union", 0, 0, 145 }, | |
38 | { "internal-only", 0, 0, 'i' }, | |
39 | { NULL, 0, 0, 0 } | |
40 | }; | |
41 | @@ -1929,6 +1931,9 @@ main(int argc, char *argv[]) { | |
42 | case 143: | |
43 | mounttype = (MS_UNBINDABLE | MS_REC); | |
44 | break; | |
45 | + case 145: /* union */ | |
46 | + mounttype = MS_UNION; | |
47 | + break; | |
48 | ||
49 | case '?': | |
50 | default: | |
4fa9d824 | 51 | diff --git a/mount-deprecated/mount_constants.h b/mount-deprecated/mount_constants.h |
f212f39a | 52 | index dc3ca27..fb4c663 100644 |
4fa9d824 AM |
53 | --- a/mount-deprecated/mount_constants.h |
54 | +++ b/mount-deprecated/mount_constants.h | |
f212f39a | 55 | @@ -39,6 +39,9 @@ flags had been set; if we have a union with more than one element - fail; |
56 | if we have a stack or plain mount - mount atop of it, forming a stack. */ | |
57 | #define MS_OVER 0x200 /* 512 */ | |
58 | #endif | |
59 | +#ifndef MS_UNION | |
60 | +#define MS_UNION 0x100 /* 256: Mount on top of a union */ | |
61 | +#endif | |
62 | #ifndef MS_NOATIME | |
63 | #define MS_NOATIME 0x400 /* 1024: Do not update access times. */ | |
64 | #endif |