From owner-freebsd-fs@freebsd.org Fri Aug 17 17:15:51 2018 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DACCC1075F98 for ; Fri, 17 Aug 2018 17:15:50 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f52.google.com (mail-it0-f52.google.com [209.85.214.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 721458A951 for ; Fri, 17 Aug 2018 17:15:50 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f52.google.com with SMTP id j81-v6so12246046ite.0 for ; Fri, 17 Aug 2018 10:15:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=kX3qEm9FlQMkHN+Oi/a1Rg9bxb817rha+tR+ntMz4hs=; b=WbkrAvN0gKXb/yGfqg7JX29hGWQEnDNgYsHn9mgYzpcuO0FMhZFT7dJID6Hlfdh2wM /39w9MRkOptVlBBiB+C6aYVhxrCNkelV+6nhCPfDAlsc5yl1Sl12nvf94YX+bfqwG4RI /JS3cnizpqAuu9/9Ic4X2EQy0oH13HQ5iac7W15qKnlkNCP42TZF6arBcZtClgHub17T 7BuMFeNxQ0xTnbeyBewPGkYWOZys367I+PcMEIpGj4p9AGNHi+/UPzx7MlMubw+YyAuu kpXJs9FI/Pcake6xtmYGQoz3w1q3Zv1cdN/cGSHSz+2y1RyG3woS6s+ngPpT+m+Ky7sW L9MA== X-Gm-Message-State: AOUpUlHwYCKApGky4EGazBCHvsKPIGApMSyehSvJmQ7y2CwrgGkbOsm+ BQjMNg07evvI2fO4Kcrr4I0s4zGt X-Google-Smtp-Source: AA+uWPw8qU4+lWI13mIe9ceNLHlPVl8WJ2szE/Niqjwy9M7W3sAnX1t/me7TssheVFAG2gV3HcWDOQ== X-Received: by 2002:a02:125b:: with SMTP id i88-v6mr32298630jad.121.1534526143893; Fri, 17 Aug 2018 10:15:43 -0700 (PDT) Received: from mail-it0-f46.google.com (mail-it0-f46.google.com. [209.85.214.46]) by smtp.gmail.com with ESMTPSA id w8-v6sm2382770itb.0.2018.08.17.10.15.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Aug 2018 10:15:43 -0700 (PDT) Received: by mail-it0-f46.google.com with SMTP id s7-v6so12227585itb.4 for ; Fri, 17 Aug 2018 10:15:43 -0700 (PDT) X-Received: by 2002:a24:f945:: with SMTP id l66-v6mr2114375ith.6.1534526143411; Fri, 17 Aug 2018 10:15:43 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:b472:0:0:0:0:0 with HTTP; Fri, 17 Aug 2018 10:15:42 -0700 (PDT) In-Reply-To: References: <20180817.172713.1462611697013497228.ish@amail.plala.or.jp> From: Conrad Meyer Date: Fri, 17 Aug 2018 10:15:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: How to mount ISO-9660 multi-extents blu-ray disc To: Masachika ISHIZUKA Cc: freebsd-fs Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 17:15:51 -0000 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 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 > 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"