* [9fans] Explanation of binding from ftpfs @ 2008-12-06 20:44 Brad Frank 2008-12-06 21:39 ` Iruata Souza 2008-12-06 22:17 ` Brad Frank 0 siblings, 2 replies; 8+ messages in thread From: Brad Frank @ 2008-12-06 20:44 UTC (permalink / raw) To: 9fans When I use ftpfs to mount a ftp site and then bind /n/ftp to another location. All appears to work fine in /n/ftp and in the other location. When I type ns, I can clearly see the pipe bind for ftpfs mounted to /n/ftp. When I unmount /n/ftp I can type ls on /n/ftp and not see anything there. But if I ls on the other location that I bound to /n/ftp, it still can access the ftp server. How is the other location able to do this, when I don't see any indication of a pipe bind still listed in ns? I do see the ftpfs process running, though. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] Explanation of binding from ftpfs 2008-12-06 20:44 [9fans] Explanation of binding from ftpfs Brad Frank @ 2008-12-06 21:39 ` Iruata Souza 2008-12-06 22:17 ` Brad Frank 1 sibling, 0 replies; 8+ messages in thread From: Iruata Souza @ 2008-12-06 21:39 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On Sat, Dec 6, 2008 at 6:44 PM, Brad Frank <brad.frank@gmail.com> wrote: > When I use ftpfs to mount a ftp site and then bind /n/ftp to another > location. All appears to work fine in /n/ftp and in the other > location. When I type ns, I can clearly see the pipe bind for ftpfs > mounted to /n/ftp. When I unmount /n/ftp I can type ls on /n/ftp and > not see anything there. But if I ls on the other location that I bound > to /n/ftp, it still can access the ftp server. How is the other > location able to do this, when I don't see any indication of a pipe > bind still listed in ns? I do see the ftpfs process running, though. > > the bind shows here, like it should cpu% ns | tail -3 mount -b '#s/rio.iru.323' /dev mount -c '#|/data1' /n/ftp cd /usr/iru cpu% bind /n/ftp new cpu% ns | tail -3 mount -c '#|/data1' /n/ftp mount '#|/data1' /usr/iru/new cd /usr/iru cpu% lc /n/ftp | tail -1 pub cpu% unmount /n/ftp cpu% ns | tail -3 mount -b '#s/rio.iru.323' /dev mount '#|/data1' /usr/iru/new cd /usr/iru cpu% lc /n/ftp cpu% lc new | tail -1 pub cpu% unmount new cpu% ns | tail -3 mount '#s/rio.iru.323' /mnt/wsys 1 mount -b '#s/rio.iru.323' /dev cd /usr/iru i may be mistaken here but it seems that unmount calls cclose which calls decref and only if the mount is the last reference to the server, it will be freed. the behaviour seems ok here, then. iru ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] Explanation of binding from ftpfs 2008-12-06 20:44 [9fans] Explanation of binding from ftpfs Brad Frank 2008-12-06 21:39 ` Iruata Souza @ 2008-12-06 22:17 ` Brad Frank 2008-12-06 22:27 ` Iruata Souza 2008-12-06 22:52 ` Brad Frank 1 sibling, 2 replies; 8+ messages in thread From: Brad Frank @ 2008-12-06 22:17 UTC (permalink / raw) To: 9fans I forgot to mention when I bind /n/ftp I was really binding /n/ftp/directory to another location. On Sat, Dec 6, 2008 at 3:44 PM, Brad Frank <brad.frank@gmail.com> wrote: > When I use ftpfs to mount a ftp site and then bind /n/ftp to another > location. All appears to work fine in /n/ftp and in the other > location. When I type ns, I can clearly see the pipe bind for ftpfs > mounted to /n/ftp. When I unmount /n/ftp I can type ls on /n/ftp and > not see anything there. But if I ls on the other location that I bound > to /n/ftp, it still can access the ftp server. How is the other > location able to do this, when I don't see any indication of a pipe > bind still listed in ns? I do see the ftpfs process running, though. > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] Explanation of binding from ftpfs 2008-12-06 22:17 ` Brad Frank @ 2008-12-06 22:27 ` Iruata Souza 2008-12-06 22:39 ` erik quanstrom 2008-12-06 22:52 ` Brad Frank 1 sibling, 1 reply; 8+ messages in thread From: Iruata Souza @ 2008-12-06 22:27 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On Sat, Dec 6, 2008 at 8:17 PM, Brad Frank <brad.frank@gmail.com> wrote: > I forgot to mention when I bind /n/ftp I was really binding > /n/ftp/directory to another location. > if I understand it correctly, the reference to the server is still there even if you don't see /n/ftp anymore. iru ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] Explanation of binding from ftpfs 2008-12-06 22:27 ` Iruata Souza @ 2008-12-06 22:39 ` erik quanstrom 0 siblings, 0 replies; 8+ messages in thread From: erik quanstrom @ 2008-12-06 22:39 UTC (permalink / raw) To: 9fans > > if I understand it correctly, the reference to the server is still > there even if you don't see /n/ftp anymore. > > iru yes, the reference is the other location. there is no heirarchy of mounts/binds. tthere is no "master" that if removed will remove the whole thing. they are simply reference counted. - erik ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] Explanation of binding from ftpfs 2008-12-06 22:17 ` Brad Frank 2008-12-06 22:27 ` Iruata Souza @ 2008-12-06 22:52 ` Brad Frank 2008-12-06 22:53 ` Brad Frank 2008-12-06 23:06 ` Russ Cox 1 sibling, 2 replies; 8+ messages in thread From: Brad Frank @ 2008-12-06 22:52 UTC (permalink / raw) To: 9fans I guess what confuses me when dealing with something like ftpfs, is that it seems to behave differently than other types of binds. Examples I've used in the past involve simple binds like this. I create 4 directories, let's say dir1, dir2, dir3, dir4. Inside dir1 and dir2 I have files. I can then: bind -b dir1 dir3 bind -b dir2 dir3 then I can bind -b dir3 dir4 When I look at ns I see not only a bind from dir3 to dir4, But I also see binds from dir1 to dir4, and dir2 to dir4. The act of binding dir3 to dir4 automatically seems to have created binds to dir1 to dir4, and dir2 to dir4. So what I guess I was expecting to see from ns when using the ftpfs scenario, was to see not only a pipe bind to /n/ftp. But Also a pipe bind to my other location, since the other location was a bind to /n/ftp. On Sat, Dec 6, 2008 at 5:17 PM, Brad Frank <brad.frank@gmail.com> wrote: > I forgot to mention when I bind /n/ftp I was really binding > /n/ftp/directory to another location. > > On Sat, Dec 6, 2008 at 3:44 PM, Brad Frank <brad.frank@gmail.com> wrote: >> When I use ftpfs to mount a ftp site and then bind /n/ftp to another >> location. All appears to work fine in /n/ftp and in the other >> location. When I type ns, I can clearly see the pipe bind for ftpfs >> mounted to /n/ftp. When I unmount /n/ftp I can type ls on /n/ftp and >> not see anything there. But if I ls on the other location that I bound >> to /n/ftp, it still can access the ftp server. How is the other >> location able to do this, when I don't see any indication of a pipe >> bind still listed in ns? I do see the ftpfs process running, though. >> > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] Explanation of binding from ftpfs 2008-12-06 22:52 ` Brad Frank @ 2008-12-06 22:53 ` Brad Frank 2008-12-06 23:06 ` Russ Cox 1 sibling, 0 replies; 8+ messages in thread From: Brad Frank @ 2008-12-06 22:53 UTC (permalink / raw) To: 9fans oh yeah, it seems to do a pipe bind to the other location, only when binding to the root. If I bind to /n/ftp/directory, it doesn't show the pipe bind in ns. On Sat, Dec 6, 2008 at 5:52 PM, Brad Frank <brad.frank@gmail.com> wrote: > I guess what confuses me when dealing with something like ftpfs, is > that it seems to behave differently than other types of binds. > Examples I've used in the past involve simple binds like this. > I create 4 directories, let's say dir1, dir2, dir3, dir4. > Inside dir1 and dir2 I have files. > I can then: > bind -b dir1 dir3 > bind -b dir2 dir3 > then I can > bind -b dir3 dir4 > > When I look at ns > I see not only a bind from dir3 to dir4, > But I also see binds from dir1 to dir4, and dir2 to dir4. The act of > binding dir3 to dir4 automatically seems to have created binds to dir1 > to dir4, and dir2 to dir4. > > So what I guess I was expecting to see from ns when using the ftpfs > scenario, was to see not only a pipe bind to /n/ftp. But Also a pipe > bind to my other location, since the other location was a bind to > /n/ftp. > > On Sat, Dec 6, 2008 at 5:17 PM, Brad Frank <brad.frank@gmail.com> wrote: >> I forgot to mention when I bind /n/ftp I was really binding >> /n/ftp/directory to another location. >> >> On Sat, Dec 6, 2008 at 3:44 PM, Brad Frank <brad.frank@gmail.com> wrote: >>> When I use ftpfs to mount a ftp site and then bind /n/ftp to another >>> location. All appears to work fine in /n/ftp and in the other >>> location. When I type ns, I can clearly see the pipe bind for ftpfs >>> mounted to /n/ftp. When I unmount /n/ftp I can type ls on /n/ftp and >>> not see anything there. But if I ls on the other location that I bound >>> to /n/ftp, it still can access the ftp server. How is the other >>> location able to do this, when I don't see any indication of a pipe >>> bind still listed in ns? I do see the ftpfs process running, though. >>> >> > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] Explanation of binding from ftpfs 2008-12-06 22:52 ` Brad Frank 2008-12-06 22:53 ` Brad Frank @ 2008-12-06 23:06 ` Russ Cox 1 sibling, 0 replies; 8+ messages in thread From: Russ Cox @ 2008-12-06 23:06 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs ns is showing you the best name it has for the resource in question. if you did bind /n/ftp/dir /n/tmp, then it can't tell you that you did mount '#s/ftp' /n/tmp because that's not accurate--'#s/ftp' would get you /n/ftp, not /n/ftp/dir. so it shows you /n/ftp/dir, because that is the name that was used at the time, even if that name no longer means the same thing. russ ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-12-06 23:06 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-12-06 20:44 [9fans] Explanation of binding from ftpfs Brad Frank 2008-12-06 21:39 ` Iruata Souza 2008-12-06 22:17 ` Brad Frank 2008-12-06 22:27 ` Iruata Souza 2008-12-06 22:39 ` erik quanstrom 2008-12-06 22:52 ` Brad Frank 2008-12-06 22:53 ` Brad Frank 2008-12-06 23:06 ` Russ Cox
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).