Re: bug in "mount --bind" for hashed tree indexed directories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 10 December 2015, Yoss@xxxxxxx wrote:
> Hello,
>
> summary:
> 'mount --bind oldfile newfile'  doesn't implement some changes in
> "newfile" if "oldfile" is situated in a hashed tree indexed directory
> (attribute I).
>
> Example:
> > lsattr /
>
>  ----------I--e- /etc
>
> > touch /etc/testa
> > touch /tmp/testa
> > mount --bind /etc/testa /tmp/testa
> > vi /etc/testa (add some characters)
> > ls -al /etc/testa
> > ls -al /tmp/testa
>
> Only the file /etc/testa contains the added characters.

This seems to be a problem of "vi". Looks like it moves the 
file /etc/testa to /etc/testa~ and then opens a newly created copy.

You can reproduce it even without mount --bind:
$ touch bla
$ tail -f bla
$ vi bla   # add some lines and safe 

tail will not show you the add lines.

> The problem seem to be more complex, because if a 'echo "test" >>
> /etc/testa' is used, it works.

Other editors may work by default. I guess vim would do what you want if 
you play around with settings like
:set noswapfile
:set backupcopy=no

cu,
Rudi
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux