* Multiple lower layers - presedence?
@ 2015-01-05 1:00 Fabian Sturm
2015-01-05 1:29 ` Fabian Sturm
0 siblings, 1 reply; 5+ messages in thread
From: Fabian Sturm @ 2015-01-05 1:00 UTC (permalink / raw)
To: linux-unionfs; +Cc: miklos
[-- Attachment #1: Type: text/plain, Size: 631 bytes --]
The current documentation states the following:
Multiple lower layers
---------------------
Multiple lower layers can now be given using the the colon (":") as a
separator character between the directory names. For example:
mount -t overlay overlay -olowerdir=/lower1:/lower2:/lower3 /merged
As the example shows, "upperdir=" and "workdir=" may be omitted. In that
case
the overlay will be read-only.
Consider the case /lower1/A and /lower2/A exist.
What is part of the api - that it is undefined or that one takes presedence
over the other?
It would be nice to have this clarified in the documentation.
Thanks,
Fabian
[-- Attachment #2: Type: text/html, Size: 4776 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Multiple lower layers - presedence?
2015-01-05 1:00 Multiple lower layers - presedence? Fabian Sturm
@ 2015-01-05 1:29 ` Fabian Sturm
2015-01-06 15:59 ` intrigeri
0 siblings, 1 reply; 5+ messages in thread
From: Fabian Sturm @ 2015-01-05 1:29 UTC (permalink / raw)
To: linux-unionfs
The current documentation of overlayfs states the following:
Multiple lower layers
---------------------
Multiple lower layers can now be given using the the colon (":") as a
separator character between the directory names. For example:
mount -t overlay overlay -olowerdir=/lower1:/lower2:/lower3 /merged
As the example shows, "upperdir=" and "workdir=" may be omitted. In that
case
the overlay will be read-only.
Consider the case /lower1/A and /lower2/A exist.
What is part of the api - that it is undefined or that one takes presedence
over the other?
It would be nice to have this clarified in the documentation.
Thanks,
Fabian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Multiple lower layers - presedence?
2015-01-05 1:29 ` Fabian Sturm
@ 2015-01-06 15:59 ` intrigeri
2015-01-07 2:22 ` hujianyang
0 siblings, 1 reply; 5+ messages in thread
From: intrigeri @ 2015-01-06 15:59 UTC (permalink / raw)
To: linux-unionfs
Hi,
Fabian Sturm wrote (05 Jan 2015 01:29:04 GMT) :
> Consider the case /lower1/A and /lower2/A exist.
> What is part of the api - that it is undefined or that one takes presedence
> over the other?
> It would be nice to have this clarified in the documentation.
IMO this should be specified. I would intuitively believe that
a right-hand lowerdir should take precedence over any left-hand one,
but my intuition definitely is tainted by cultural background that not
everyone shares, so it's probably worth looking at how it's done in
aufs, to make migration easier for aufs users.
Cheers,
--
intrigeri
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Multiple lower layers - presedence?
2015-01-06 15:59 ` intrigeri
@ 2015-01-07 2:22 ` hujianyang
2015-01-08 14:10 ` Miklos Szeredi
0 siblings, 1 reply; 5+ messages in thread
From: hujianyang @ 2015-01-07 2:22 UTC (permalink / raw)
To: intrigeri, fabian.sturm; +Cc: linux-unionfs, Miklos Szeredi
On 2015/1/6 23:59, intrigeri wrote:
> Hi,
>
> Fabian Sturm wrote (05 Jan 2015 01:29:04 GMT) :
>> Consider the case /lower1/A and /lower2/A exist.
>> What is part of the api - that it is undefined or that one takes presedence
>> over the other?
>> It would be nice to have this clarified in the documentation.
>
> IMO this should be specified. I would intuitively believe that
> a right-hand lowerdir should take precedence over any left-hand one,
> but my intuition definitely is tainted by cultural background that not
> everyone shares, so it's probably worth looking at how it's done in
> aufs, to make migration easier for aufs users.
Hi,
It seems different in overlayfs. A left-hand lowerdir take precedence
over any right-hand one in the option line.
For example, we have two file with same name in two lower directories.
/mnt/ext4/lower1 # echo lower1 > file
/mnt/ext4/lower2 # echo lower2 > file
and mount them in different order.
/mnt # mount -t overlay overlay -o lowerdir=./ext4/lower1/:./ext4/lower2/ ./overlay
/mnt # cat ./overlay/file
lower1
/mnt # mount -t overlay overlay -o lowerdir=./ext4/lower2/:./ext4/lower1/ ./overlay
/mnt # cat ./overlay/file
lower2
It is because lowerdirs are store in a buffer which is scanned by mount
function of overlayfs from left to right. The left most one is treat as
the top most lowerdir and the right most lowerdir is treat as the lowest
lowerdir.
I think a definition about this is needed in the documentation.
Thanks,
Hu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Multiple lower layers - presedence?
2015-01-07 2:22 ` hujianyang
@ 2015-01-08 14:10 ` Miklos Szeredi
0 siblings, 0 replies; 5+ messages in thread
From: Miklos Szeredi @ 2015-01-08 14:10 UTC (permalink / raw)
To: hujianyang; +Cc: intrigeri, fabian.sturm, linux-unionfs
On Wed, Jan 7, 2015 at 3:22 AM, hujianyang <hujianyang@huawei.com> wrote:
> It seems different in overlayfs. A left-hand lowerdir take precedence
> over any right-hand one in the option line.
Documentation added.
Thanks,
Miklos
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-01-08 14:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-05 1:00 Multiple lower layers - presedence? Fabian Sturm
2015-01-05 1:29 ` Fabian Sturm
2015-01-06 15:59 ` intrigeri
2015-01-07 2:22 ` hujianyang
2015-01-08 14:10 ` Miklos Szeredi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.