Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Aug 2018 10:01:39 -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:  <CAG6CVpUPCEETC48HSigtpFHddkajqgyfrEC9ByAqJdAm99XeSQ@mail.gmail.com>
In-Reply-To: <20180817.172713.1462611697013497228.ish@amail.plala.or.jp>
References:  <20180817.172713.1462611697013497228.ish@amail.plala.or.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
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?CAG6CVpUPCEETC48HSigtpFHddkajqgyfrEC9ByAqJdAm99XeSQ>