Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Aug 2018 10:15:42 -0700
From:      Conrad Meyer <cem@freebsd.org>
To:        Masachika ISHIZUKA <ish@amail.plala.or.jp>
Cc:        freebsd-fs <freebsd-fs@freebsd.org>
Subject:   Re: How to mount ISO-9660 multi-extents blu-ray disc
Message-ID:  <CAG6CVpWp67w8c6tWy%2BBYMiBFvrCkzOVG9Ya6VZPdToYHrLXOhw@mail.gmail.com>
In-Reply-To: <CAG6CVpUPCEETC48HSigtpFHddkajqgyfrEC9ByAqJdAm99XeSQ@mail.gmail.com>
References:  <20180817.172713.1462611697013497228.ish@amail.plala.or.jp> <CAG6CVpUPCEETC48HSigtpFHddkajqgyfrEC9ByAqJdAm99XeSQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In particular it appears that our vget routine needs to check the
directory entry flags for the 7th bit (0x80)[1], which "if set, this
is not the final directory record for this file" and the remaining
records describe the additional extents.  We likely need to modify the
read path to support such multi-extent files as well.

I guess we also already have an open PR for it, 95222, if you are
interested in CC'ing there.

Best,
Conrad

[1]: https://wiki.osdev.org/ISO_9660#Directories

On Fri, Aug 17, 2018 at 10:01 AM, Conrad Meyer <cem@freebsd.org> wrote:
> Thanks for the report.  It looks like classic 32-bit truncation is
> happening somewhere on the file size:
>
> $ printf "%x\n" 5368709120
> 140000000
> $ printf "%x\n" 1073741824
> 40000000
>
> This is at least in part due to the inode i_size being a (32-bit)
> unsigned long.  i_size is initialized by isonum_733(isodir->size) in
> cd9660_vget_internal(), which decodes a 32-bit little endian number.
> So i_size needs to be expanded, and there may be additional logic
> needed to enumerate size information for files larger than 4GB.
>
> This is a deficiency in cd9660 that I don't believe can be addressed
> with a mount time option, so if possible, please file a PR in bugzilla
> to track this.
>
> Thank you,
> Conrad
>
> On Fri, Aug 17, 2018 at 1:27 AM, Masachika ISHIZUKA
> <ish@amail.plala.or.jp> wrote:
>> Hi.
>>
>> I was written 5gb file on bru-ray disc by growisofs with linux.
>> I want to mount it with freebsd, but only last extent of file is
>> shown as follows.
>>
>> freebsd# mount -t cd9660 /dev/cd0 /cdrom
>> freebsd# ls -l /cdrom/test/
>> total 1048576
>> -rw-r--r--  1 root  wheel  1073741824 Aug 17 16:58 test5g
>>
>> On the other hand, linux can handle multi-extents disc as follows.
>>
>> ubuntu# mount /dev/sr0 /cdrom
>> ubuntu# ls -l /cdrom/test/
>> total 5242880
>> -r--r--r-- 1 nobody nogroup 5368709120 Aug 17 16:58 test5g
>>
>> How can I mount multi-extents disc with freebsd ?
>> _______________________________________________
>> freebsd-fs@freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-fs
>> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpWp67w8c6tWy%2BBYMiBFvrCkzOVG9Ya6VZPdToYHrLXOhw>