From: Jaegeuk Kim <jaegeuk.kim@samsung.com>
To: Ezequiel Garcia <elezegarcia@gmail.com>
Cc: linux-fsdevel@vger.kernel.org,
Ezequiel Garcia <ezequiel@free-electrons.com>
Subject: Re: [PATCH] [f2fs-tools] mkfs: Make HDIO_GETGEO ioctl optional
Date: Wed, 12 Dec 2012 11:19:01 +0900 [thread overview]
Message-ID: <1355278741.24219.12.camel@kjgkr> (raw)
In-Reply-To: <1355278115-12537-1-git-send-email-elezegarcia@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1165 bytes --]
2012-12-11 (화), 23:08 -0300, Ezequiel Garcia:
> From: Ezequiel Garcia <ezequiel@free-electrons.com>
>
> Some block devices don't implement HDIO_GETGEP ioctl;
> loop device being a notable example.
> Without this patch, it's not possible to make a f2fs
> on a file mounted over a loop device.
>
> Signed-off-by: Ezequiel Garcia <ezequiel@free-electrons.com>
> ---
> mkfs/f2fs_format.c | 9 ++++-----
> 1 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
> index d3e1d0c..b542db5 100644
> --- a/mkfs/f2fs_format.c
> +++ b/mkfs/f2fs_format.c
> @@ -262,11 +262,10 @@ static int8_t f2fs_get_device_info()
> return -1;
> }
>
> - if (ioctl(fd, HDIO_GETGEO, &geom) < 0) {
> - printf("\n\tError: Cannot get the device geometry\n");
> - return -1;
> - }
> - f2fs_params.start_sector = geom.start;
> + if (ioctl(fd, HDIO_GETGEO, &geom) < 0)
> + f2fs_params.start_sector = 0;
> + else
> + f2fs_params.start_sector = geom.start;
> }
> else {
> printf("\n\n\tError: Volume type is not supported!!!\n");
Merged, thanks. :)
--
Jaegeuk Kim
Samsung
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2012-12-12 2:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-12 2:08 [PATCH] [f2fs-tools] mkfs: Make HDIO_GETGEO ioctl optional Ezequiel Garcia
2012-12-12 2:19 ` Jaegeuk Kim [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1355278741.24219.12.camel@kjgkr \
--to=jaegeuk.kim@samsung.com \
--cc=elezegarcia@gmail.com \
--cc=ezequiel@free-electrons.com \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox