From: Ricardo C. <sou...@wi...> - 2006-12-28 19:48:18
|
Hi, For some reason, I can't execute files on my filesystem with direct_io. I'm using the low-level API, my FS is mounting the filesystems directly with the following arguments: "-o fsname=%s,allow_other,debug" This is the output of strace when trying to execute a file: wizeman@wizy-laptop:/pool$ strace ./fsx execve("./fsx", ["./fsx"], [/* 34 vars */]) = -1 EFAULT (Bad address) dup(2) = 3 fcntl(3, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE) fstat(3, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 3), ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b3ac35e8000 lseek(3, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek) write(3, "strace: exec: Bad address\n", 26strace: exec: Bad address ) = 26 close(3) = 0 munmap(0x2b3ac35e8000, 4096) = 0 exit_group(1) = ? Process 9970 detached This is the output of FUSE when doing the strace: unique: 26, opcode: LOOKUP (1), nodeid: 1, insize: 44 unique: 26, error: 0 (Success), outsize: 136 unique: 27, opcode: OPEN (14), nodeid: 22470, insize: 48 unique: 27, error: 0 (Success), outsize: 32 unique: 28, opcode: RELEASE (18), nodeid: 22470, insize: 56 unique: 28, error: 0 (Success), outsize: 16 As you can see, a READ is not even issued. I have found out that if I don't set direct_io when opening the file, it works. I have tested with FUSE 2.5.3 and 2.6.0. I have also found out that mmaps don't work with direct_io, even non-writable ones.. Is there any way to make this work? The plan is to get rid of direct_io, since it will have better performance, but I don't know how safe it is to do that at this point for my filesystem in particular. Thanks. |
From: Steven J. <py...@li...> - 2006-12-28 20:51:40
|
Greetings, On Thu, 28 Dec 2006, Ricardo Correia wrote: > Hi, > > For some reason, I can't execute files on my filesystem with direct_io. > > I'm using the low-level API, my FS is mounting the filesystems directly with > the following arguments: "-o fsname=%s,allow_other,debug" > Since exec mmaps the executable into memory, it can't work with direct_io. G'day, sjames |