From owner-freebsd-current@FreeBSD.ORG Fri Apr 2 11:09:36 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E274106564A for ; Fri, 2 Apr 2010 11:09:36 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 9B17B8FC1C for ; Fri, 2 Apr 2010 11:09:35 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA29231; Fri, 02 Apr 2010 14:09:33 +0300 (EEST) (envelope-from avg@freebsd.org) Message-ID: <4BB5D06C.8080902@freebsd.org> Date: Fri, 02 Apr 2010 14:09:32 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100319) MIME-Version: 1.0 To: Fabian Keil References: <3a142e751003190508x6a06868ene2e8fd9ddd977f66@mail.gmail.com> <3a142e751003191021p141af009m6acf7d160c890cbb@mail.gmail.com> <20100319191133.46fe271c@r500.local> <3a142e751003191126j331e525fwb9e5573bbf6f7d58@mail.gmail.com> <4BAA30CB.1070707@icyb.net.ua> <20100328172537.501ed3d1@r500.local> <4BB0A053.9060007@freebsd.org> <20100329222920.5eef6395@r500.local> <4BB111D4.8060809@freebsd.org> <20100330173637.202b4b1e@r500.local> <4BB21BBA.7030407@freebsd.org> <4BB360A1.7020309@freebsd.org> <20100402125721.50b3ba4f@r500.local> In-Reply-To: <20100402125721.50b3ba4f@r500.local> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Kostik Belousov , freebsd-current@freebsd.org, Bruce Evans Subject: Re: newfs_msdos and DVD-RAM X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 11:09:36 -0000 on 02/04/2010 13:57 Fabian Keil said the following: > Andriy Gapon wrote: >> Anyways, here is a patch that I would use. >> Unfortunately, ENOTIME to understand newfs_msdos code and fix it too, >> >> --- a/sys/fs/msdosfs/msdosfs_vfsops.c >> +++ b/sys/fs/msdosfs/msdosfs_vfsops.c >> @@ -580,6 +580,7 @@ mountmsdosfs(struct vnode *devvp, struct mount *mp) >> || (pmp->pm_BytesPerSec & (pmp->pm_BytesPerSec - 1)) >> || (pmp->pm_HugeSectors == 0) >> || (pmp->pm_FATsecs == 0) >> + || (SecPerClust * pmp->pm_BlkPerSec > MAXBSIZE / DEV_BSIZE) >> ) { >> error = EINVAL; >> goto error_exit; > > That works, too: > > fk@r500 ~ $sudo mdconfig -a -t vnode -f /tank/ipod-image-formatiert > md0 > fk@r500 ~ $sudo mount_msdosfs /dev/md0 /mnt/ > mount_msdosfs: /dev/md0: Invalid argument > > Is there a chance that this, or some other workaround, could be committed? Yes, there is 99.99% chance of this happening :-) Now, if someone could fix newfs_msdos issue too. I could easily reproduce it this way: $ truncate -s 5G test.img $ mdconfig -a -t vnode -f test.img -S 2048 -u 0 $ newfs_msdos -F 32 /dev/md0 -- Andriy Gapon