Date: Sat, 10 Dec 2011 17:49:42 +0100 From: Robert Millan <rmh@freebsd.org> To: "Andrey V. Elsukov" <ae@freebsd.org> Cc: freebsd-fs@freebsd.org, Adrian Chadd <adrian@freebsd.org> Subject: Re: [PATCH] Wipe other file systems when creating new UFS Message-ID: <CAOfDtXPN1jNnZdFzmehhqai2yEZUWN7KA1CYqrv%2B7Key7t_X=Q@mail.gmail.com> In-Reply-To: <4EE18901.7060800@FreeBSD.org> References: <20111208134307.GA5266@thorin> <4EE18901.7060800@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
2011/12/9 Andrey V. Elsukov <ae@freebsd.org>: > i think before erasing 512 kib you should at least check actual available > mediasize and don't use hardcoded 512 sector size. 2011/12/9 Andrey V. Elsukov <ae@freebsd.org>: > sorry, now i see that you have used disk.d_bsize, not hardcoded. > But the check for mediasize is still needed. :) I think I'm actually checking for physical media size, in: mediasize = get_block_device_size(disk.d_fd); which is based on output from ioctl rather than file system data structures. Is that what you meant?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOfDtXPN1jNnZdFzmehhqai2yEZUWN7KA1CYqrv%2B7Key7t_X=Q>