Date: Sun, 16 Mar 2003 16:58:57 +1100 From: Tim Robbins <tjr@FreeBSD.org> To: FUJITA Kazutoshi <fujita@soum.co.jp> Cc: freebsd-current@FreeBSD.org Subject: Re: UDF: bad file descriptor Message-ID: <20030316165857.A74938@dilbert.robbins.dropbear.id.au> In-Reply-To: <20030316.060650.71086272.fujita@soum.co.jp>; from fujita@soum.co.jp on Sun, Mar 16, 2003 at 06:06:50AM %2B0900 References: <20030315.202727.74753735.fujita@soum.co.jp> <20030316003641.A48585@dilbert.robbins.dropbear.id.au> <20030316.052351.74752614.fujita@soum.co.jp> <20030316.060650.71086272.fujita@soum.co.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
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 -0000 1.10 +++ sys/fs/udf/udf_vfsops.c 16 Mar 2003 03:01:28 -0000 @@ -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 majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030316165857.A74938>