login
Header Space

 
 

Re: linux-2.6.25: 'mkdir -p' does not work with rootdir as mount point inside a read only filesystem

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: NeilBrown <neilb@...>
Cc: Andrew Morton <akpm@...>, Lothar <lw@...>, <linux-kernel@...>
Date: Saturday, May 3, 2008 - 2:32 am

On Fri, May 02, 2008 at 04:55:43PM +1000, NeilBrown wrote:

I would bet this is the problem for the reporter.

I tried the same here, and cannot exhibit the problem. Just like the
reporter, my / is ro and /dev is rw :

# mkdir --version
mkdir (coreutils) 5.2.1
...

# uname -a
Linux alix-2C3 2.6.25-wt4-alix #3 Thu Apr 24 08:30:05 CEST 2008 i586 i586 i386 GNU/Linux

(this is essentially 2.6.25+squashfs+some geode patches)

# mount
/dev/sda4 on / type ext3 (ro,errors=continue,data=ordered)
/dev on /dev type tmpfs (rw,size=0k,nr_inodes=4096,mode=755)

# mkdir -p /dev/a/b/c
# ls -lad /dev/a/b/c
drwxr-xr-x  2 root root 40 Jan  3 00:49 /dev/a/b/c/

# rmdir -p /dev/a/b/c
rmdir: `/dev': Read-only file system
# strace mkdir -p /dev/a/b/c

stat64("/dev/a/b/c", 0xbf9175dc)        = -1 ENOENT (No such file or directory)
umask(0)                                = 022
open(".", O_RDONLY|O_LARGEFILE|O_DIRECTORY) = 3
chdir("/")                              = 0
mkdir("dev", 0755)                      = -1 EEXIST (File exists)
stat64("dev", {st_mode=S_IFDIR|0755, st_size=17080, ...}) = 0
chdir("dev")                            = 0
mkdir("a", 0755)                        = 0
chdir("a")                              = 0
mkdir("b", 0755)                        = 0
chdir("b")                              = 0
umask(022)                              = 0
mkdir("c", 0777)                        = 0
fchdir(3)                               = 0
close(3)                                = 0

Regards,
Willy

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: linux-2.6.25: 'mkdir -p' does not work with rootdir as m..., Willy Tarreau, (Sat May 3, 2:32 am)
speck-geostationary