Re: UDF: bad file descriptor
From: Tim Robbins <[EMAIL PROTECTED]> Subject: Re: UDF: bad file descriptor Date: Sun, 16 Mar 2003 16:58:57 +1100 Message-ID: <[EMAIL PROTECTED]> > The Linux driver doesn't seem to issue the special read and write commands > that the quote from the UDF spec. mentions, so I'm not sure whether > it will work. Let me know how it goes. I tried your patch. The error 'bad file descriptor' did not occur, but something strange. 'ls' reports the size exactly(maybe), but another command report it as 0(empty). # /bin/ls -l total 2269738 drw-rw-rw- 1 root wheel2048 Mar 17 21:52 . drw-rw-rw- 4 root wheel2048 Mar 17 21:30 .. -rw-rw-rw- 1 root wheel 61450 Mar 17 23:19 VR_MANGR.BUP -rw-rw-rw- 1 root wheel 61450 Mar 17 23:19 VR_MANGR.IFO -rw-rw-rw- 1 root wheel 2324088832 Mar 17 23:19 VR_MOVIE.VRO # file VR_MOVIE.VRO VR_MOVIE.VRO: empty # dd if=VR_MOVIE.VRO of=/dev/null 0+0 records in 0+0 records out 0 bytes transferred in 0.16 secs (0 bytes/sec) Regards, To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: UDF: bad file descriptor
From: Scott Long <[EMAIL PROTECTED]> Subject: Re: UDF: bad file descriptor Date: Sat, 15 Mar 2003 21:29:16 -0700 Message-ID: <[EMAIL PROTECTED]> > Sorry for neglecting UDF for so long. Regarding this problem, what > program was used to generate the UDF filesystem on the disk? If the > disk doesn't have much data on it, would it be possible to 'dd' an > image of the disk to a file and send me the file? The UDF filesystem generated by 'TOSHIBA HDD&DVD video recorder'. # It is similar to VTR but record to HDD or DVD-RAM. So I don't know its detail;-p Maybe the size is 4.7GB. Do you want it?;-) Regards, To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: UDF: bad file descriptor
On Sun, Mar 16, 2003 at 06:06:50AM +0900, FUJITA Kazutoshi wrote: > I could mount DVD-RAM successfully. > (This media was formatted by TOSHIBA HDD&DVD video recorder;-p) > But, some files can't be read. > How can I solve this? [...] > # /bin/ls -l > ls: VR_MOVIE.VRO: Bad file descriptor > total 111 > drw-rw-rw- 1 root wheel 2048 Mar 12 13:33 . > drw-rw-rw- 4 root wheel 2048 Mar 16 18:00 .. > -rw-rw-rw- 1 root wheel 56980 Mar 16 18:01 VR_MANGR.BUP > -rw-rw-rw- 1 root wheel 56980 Mar 16 18:01 VR_MANGR.IFO The most likely explanation I can think of for this problem is that "VR_MOVIE.VRO" is a real-time file: 6.11 Real-Time Files A Real-Time file is a file that requires a minimum data-transfer rate when writing or reading, for example, audio and video data. For these files special read and write commands are needed. For example for CD and DVD devices these special commands can be found in the Mount Fuji 4 specification. A Real-Time file shall be identified by file type 249 in the File Type field of the file's ICB Tag. (from OSTA UDF spec, revision 2.01, March 15, 2000) If the file is a real-time file, then the "bad file descriptor" errors are occuring because FreeBSD's UDF filesystem doesn't supports this type of file. Here's a patch that mimics the logic the Linux UDF code uses to decide which UDF file types map to the UNIX "regular" file type: Index: sys/fs/udf/udf_vfsops.c === RCS file: /home/ncvs/src/sys/fs/udf/udf_vfsops.c,v retrieving revision 1.10 diff -u -r1.10 udf_vfsops.c --- sys/fs/udf/udf_vfsops.c 11 Mar 2003 22:15:09 - 1.10 +++ sys/fs/udf/udf_vfsops.c 16 Mar 2003 03:01:28 - @@ -618,12 +618,16 @@ switch (unode->fentry->icbtag.file_type) { default: + printf("unrecognised file type %d\n", + (int)unode->fentry->icbtag.file_type); vp->v_type = VBAD; break; case 4: vp->v_type = VDIR; break; + case 0: case 5: + case 249: vp->v_type = VREG; break; case 6: The Linux driver doesn't seem to issue the special read and write commands that the quote from the UDF spec. mentions, so I'm not sure whether it will work. Let me know how it goes. Tim To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: UDF: bad file descriptor
Hi, Sorry for neglecting UDF for so long. Regarding this problem, what program was used to generate the UDF filesystem on the disk? If the disk doesn't have much data on it, would it be possible to 'dd' an image of the disk to a file and send me the file? Scott FUJITA Kazutoshi wrote: From: Andre Guibert de Bruet <[EMAIL PROTECTED]> Subject: Re: UDF: bad file descriptor Date: Sat, 15 Mar 2003 21:09:55 -0500 (EST) Message-ID: <[EMAIL PROTECTED]> # /bin/ls -l ls: VR_MOVIE.VRO: Bad file descriptor total 111 drw-rw-rw- 1 root wheel 2048 Mar 12 13:33 . drw-rw-rw- 4 root wheel 2048 Mar 16 18:00 .. -rw-rw-rw- 1 root wheel 56980 Mar 16 18:01 VR_MANGR.BUP -rw-rw-rw- 1 root wheel 56980 Mar 16 18:01 VR_MANGR.IFO Sounds like the lstat on VR_MOVIE.VRO is failing. Does 'truss ls -l' display anything relevant? It seems there is no relevant. # truss /bin/ls -l ioctl(1,TIOCGETA,0xbfbff3b0) = 0 (0x0) ioctl(1,TIOCGWINSZ,0xbfbff414) = 0 (0x0) getuid() = 0 (0x0) readlink("/etc/malloc.conf",0xbfbff300,63) ERR#2 'No such file or directory' issetugid() = 0 (0x0) getuid() = 0 (0x0) mmap(0x0,4096,0x3,0x1002,-1,0x0) = 671887360 (0x280c3000) break(0x80d5000) = 0 (0x0) break(0x80d6000) = 0 (0x0) break(0x80d7000) = 0 (0x0) break(0x80d8000) = 0 (0x0) lstat(".",0x80d7148) = 0 (0x0) open(".",0x0,00) = 3 (0x3) fchdir(0x3) = 0 (0x0) open(".",0x0,00) = 4 (0x4) stat(".",0xbfbff2c0) = 0 (0x0) open(".",0x4,00) = 5 (0x5) fstat(5,0xbfbff2c0) = 0 (0x0) fcntl(0x5,0x2,0x1) = 0 (0x0) __sysctl(0xbfbff170,0x2,0x80cf4dc,0xbfbff16c,0x0,0x0) = 0 (0x0) fstatfs(0x5,0xbfbff1c0) = 0 (0x0) break(0x80d9000) = 0 (0x0) fstat(5,0xbfbff2c0) = 0 (0x0) fchdir(0x5) = 0 (0x0) getdirentries(0x5,0x80d8000,0x1000,0x80d5054)= 96 (0x60) lstat(".",0x80d7248) = 0 (0x0) lstat("..",0x80d7348)= 0 (0x0) lstat("VR_MOVIE.VRO",0x80d7448) ERR#9 'Bad file descriptor' lstat("VR_MANGR.BUP",0x80d7548) = 0 (0x0) lstat("VR_MANGR.IFO",0x80d7648) = 0 (0x0) getdirentries(0x5,0x80d8000,0x1000,0x80d5054)= 0 (0x0) lseek(5,0x0,0) = 0 (0x0) close(5) = 0 (0x0) fchdir(0x3) = 0 (0x0) fchdir(0x4) = 0 (0x0) close(4) = 0 (0x0) stat("/etc/nsswitch.conf",0xbfbfed60)= 0 (0x0) open("/etc/nsswitch.conf",0x0,0666) = 4 (0x4) break(0x80da000) = 0 (0x0) ioctl(4,TIOCGETA,0xbfbfec60) ERR#25 'Inappropriate ioctl for device' fstat(4,0xbfbfebb0) = 0 (0x0) break(0x80de000) = 0 (0x0) read(0x4,0x80da000,0x4000) = 0 (0x0) ioctl(4,TIOCGETA,0xbfbfec40) ERR#25 'Inappropriate ioctl for device' close(4) = 0 (0x0) geteuid()= 0 (0x0) stat("/etc/spwd.db",0xbfbfeca0) = 0 (0x0) open("/etc/spwd.db",0x0,00) = 4 (0x4) fcntl(0x4,0x2,0x1) = 0 (0x0) read(0x4,0x80d8200,0x104)= 260 (0x104) lseek(4,0x5000,0)= 20480 (0x5000) read(0x4,0x80da000,0x1000) = 4096 (0x1000) lseek(4,0x4000,0)= 16384 (0x4000) read(0x4,0x80db000,0x1000) = 4096 (0x1000) open("/etc/group",0x0,0666) = 5 (0x5) fstat(5,0xbfbfec80) = 0 (0x0) break(0x80e2000) = 0 (0x0) lseek(5,0x0,1) = 0 (0x0) lseek(5,0x0,0) = 0 (0x0) stat("/etc/nsswitch.conf",0xbfbfed40)= 0 (0x0) read(0x5,0x80de000,0x4000) = 378 (0x17a) ls: write(2,0xbfbfe4d0,4)= 4 (0x4) VR_MOVIE.VRO: Bad file descriptorwrite
Re: UDF: bad file descriptor
From: Andre Guibert de Bruet <[EMAIL PROTECTED]> Subject: Re: UDF: bad file descriptor Date: Sat, 15 Mar 2003 21:09:55 -0500 (EST) Message-ID: <[EMAIL PROTECTED]> > > # /bin/ls -l > > ls: VR_MOVIE.VRO: Bad file descriptor > > total 111 > > drw-rw-rw- 1 root wheel 2048 Mar 12 13:33 . > > drw-rw-rw- 4 root wheel 2048 Mar 16 18:00 .. > > -rw-rw-rw- 1 root wheel 56980 Mar 16 18:01 VR_MANGR.BUP > > -rw-rw-rw- 1 root wheel 56980 Mar 16 18:01 VR_MANGR.IFO > > Sounds like the lstat on VR_MOVIE.VRO is failing. Does 'truss ls -l' > display anything relevant? It seems there is no relevant. # truss /bin/ls -l ioctl(1,TIOCGETA,0xbfbff3b0) = 0 (0x0) ioctl(1,TIOCGWINSZ,0xbfbff414) = 0 (0x0) getuid() = 0 (0x0) readlink("/etc/malloc.conf",0xbfbff300,63) ERR#2 'No such file or directory' issetugid() = 0 (0x0) getuid() = 0 (0x0) mmap(0x0,4096,0x3,0x1002,-1,0x0) = 671887360 (0x280c3000) break(0x80d5000) = 0 (0x0) break(0x80d6000) = 0 (0x0) break(0x80d7000) = 0 (0x0) break(0x80d8000) = 0 (0x0) lstat(".",0x80d7148) = 0 (0x0) open(".",0x0,00) = 3 (0x3) fchdir(0x3) = 0 (0x0) open(".",0x0,00) = 4 (0x4) stat(".",0xbfbff2c0) = 0 (0x0) open(".",0x4,00) = 5 (0x5) fstat(5,0xbfbff2c0) = 0 (0x0) fcntl(0x5,0x2,0x1) = 0 (0x0) __sysctl(0xbfbff170,0x2,0x80cf4dc,0xbfbff16c,0x0,0x0) = 0 (0x0) fstatfs(0x5,0xbfbff1c0) = 0 (0x0) break(0x80d9000) = 0 (0x0) fstat(5,0xbfbff2c0) = 0 (0x0) fchdir(0x5) = 0 (0x0) getdirentries(0x5,0x80d8000,0x1000,0x80d5054)= 96 (0x60) lstat(".",0x80d7248) = 0 (0x0) lstat("..",0x80d7348)= 0 (0x0) lstat("VR_MOVIE.VRO",0x80d7448) ERR#9 'Bad file descriptor' lstat("VR_MANGR.BUP",0x80d7548) = 0 (0x0) lstat("VR_MANGR.IFO",0x80d7648) = 0 (0x0) getdirentries(0x5,0x80d8000,0x1000,0x80d5054)= 0 (0x0) lseek(5,0x0,0) = 0 (0x0) close(5) = 0 (0x0) fchdir(0x3) = 0 (0x0) fchdir(0x4) = 0 (0x0) close(4) = 0 (0x0) stat("/etc/nsswitch.conf",0xbfbfed60)= 0 (0x0) open("/etc/nsswitch.conf",0x0,0666) = 4 (0x4) break(0x80da000) = 0 (0x0) ioctl(4,TIOCGETA,0xbfbfec60) ERR#25 'Inappropriate ioctl for device' fstat(4,0xbfbfebb0) = 0 (0x0) break(0x80de000) = 0 (0x0) read(0x4,0x80da000,0x4000) = 0 (0x0) ioctl(4,TIOCGETA,0xbfbfec40) ERR#25 'Inappropriate ioctl for device' close(4) = 0 (0x0) geteuid()= 0 (0x0) stat("/etc/spwd.db",0xbfbfeca0) = 0 (0x0) open("/etc/spwd.db",0x0,00) = 4 (0x4) fcntl(0x4,0x2,0x1) = 0 (0x0) read(0x4,0x80d8200,0x104)= 260 (0x104) lseek(4,0x5000,0)= 20480 (0x5000) read(0x4,0x80da000,0x1000) = 4096 (0x1000) lseek(4,0x4000,0)= 16384 (0x4000) read(0x4,0x80db000,0x1000) = 4096 (0x1000) open("/etc/group",0x0,0666) = 5 (0x5) fstat(5,0xbfbfec80) = 0 (0x0) break(0x80e2000) = 0 (0x0) lseek(5,0x0,1) = 0 (0x0) lseek(5,0x0,0) = 0 (0x0) stat("/etc/nsswitch.conf",0xbfbfed40)= 0 (0x0) read(0x5,0x80de000,0x4000) = 378 (0x17a) ls: write(2,0xbfbfe4d0,4)= 4 (0x4) VR_MOVIE.VRO: Bad file descriptorwrite(2,0xbfbfe4f0,33) = 33 (0x21) write(2,0x80c4733,1) = 1 (0x1) fstat(1,0xbfbfe850) = 0 (0x0) ioctl(1,TIOCGETA,0xbfbfe890)
Re: UDF: bad file descriptor
On Sun, 16 Mar 2003, FUJITA Kazutoshi wrote: > I could mount DVD-RAM successfully. > But, some files can't be read. > How can I solve this? > > # /bin/ls > . .. VR_MANGR.BUPVR_MANGR.IFOVR_MOVIE.VRO > > # /bin/ls -l > ls: VR_MOVIE.VRO: Bad file descriptor > total 111 > drw-rw-rw- 1 root wheel 2048 Mar 12 13:33 . > drw-rw-rw- 4 root wheel 2048 Mar 16 18:00 .. > -rw-rw-rw- 1 root wheel 56980 Mar 16 18:01 VR_MANGR.BUP > -rw-rw-rw- 1 root wheel 56980 Mar 16 18:01 VR_MANGR.IFO Sounds like the lstat on VR_MOVIE.VRO is failing. Does 'truss ls -l' display anything relevant? > Andre Guibert de Bruet | Enterprise Software Consultant > > Silicon Landmark, LLC. | http://siliconlandmark.com/> To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
UDF: bad file descriptor
From: FUJITA Kazutoshi <[EMAIL PROTECTED]> Subject: Re: crash: lockmgr: locking against myself Date: Sun, 16 Mar 2003 05:23:51 +0900 (JST) Message-ID: <[EMAIL PROTECTED]> > It looks good for me. > At least, crash is avoided and mount successfully. I could mount DVD-RAM successfully. (This media was formatted by TOSHIBA HDD&DVD video recorder;-p) But, some files can't be read. How can I solve this? # /bin/ls . .. VR_MANGR.BUPVR_MANGR.IFOVR_MOVIE.VRO # /bin/ls -l ls: VR_MOVIE.VRO: Bad file descriptor total 111 drw-rw-rw- 1 root wheel 2048 Mar 12 13:33 . drw-rw-rw- 4 root wheel 2048 Mar 16 18:00 .. -rw-rw-rw- 1 root wheel 56980 Mar 16 18:01 VR_MANGR.BUP -rw-rw-rw- 1 root wheel 56980 Mar 16 18:01 VR_MANGR.IFO Regards, To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message