From: Adrian Hunter <adrian.hunter@nokia.com>
To: Josh Boyer <jwboyer@gmail.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
Ricard Wanderlof <ricard.wanderlof@axis.com>
Subject: Re: [PATCH] [MTD] mtd-utils: Use new 64-bit ioctls to access >4GiB devices
Date: Wed, 18 Mar 2009 14:46:14 +0200 [thread overview]
Message-ID: <49C0ED16.1030601@nokia.com> (raw)
In-Reply-To: <20090318122658.GC2381@yoda.jdub.homelinux.org>
Josh Boyer wrote:
> On Wed, Mar 18, 2009 at 02:16:04PM +0200, Adrian Hunter wrote:
>> Josh Boyer wrote:
>>> On Wed, Mar 18, 2009 at 08:50:08AM +0100, Ricard Wanderlof wrote:
>>>> On Wed, 18 Mar 2009, Kevin Cernekee wrote:
>>>>
>>>>> This patch depends on "CORE: New ioctl calls for >4GiB device support".
>>>>>
>>>>> Use the new kernel ioctls to support >4GiB flash devices in mtd-utils.
>>>>> - if(ioctl(Fd,MEMGETREGIONINFO,&(reginfo[i])) != 0)
>>>>> + if(ioctl(Fd,MEMGETREGIONINFO64,&(reginfo[i])) != 0)
>>>> Wouldn't it be an idea to support both the old and new calls for a
>>>> while (using compile time switching), in case someone wants to grab
>>>> a newer version of mtdtools but doesn't have a newer kernel for
>>>> whatever reason?
>>> Yes, it would. In fact, it would be better to probably add a new
>>> --large-device (or similar) option to all the utilities so that
>>> they can use both with a runtime switch.
>> I would suggest just trying MEMGETINFO64 and if it returns ENOTTY
>> then switch to the old ioctls.
>
> Well, that's an option. However, it would have to do that for every
> ioctl that is called and it's not exactly cheap to do a system call.
I was thinking just do it once per invocation and set a flag for the
rest of the code.
> Performance might be sort of silly to worry about though. It would
> certainly be better than the patch as it is.
next prev parent reply other threads:[~2009-03-18 12:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-18 1:13 [PATCH] [MTD] mtd-utils: Use new 64-bit ioctls to access >4GiB devices Kevin Cernekee
2009-03-18 7:50 ` Ricard Wanderlof
2009-03-18 12:06 ` Josh Boyer
2009-03-18 12:16 ` Adrian Hunter
2009-03-18 12:26 ` Josh Boyer
2009-03-18 12:46 ` Adrian Hunter [this message]
2009-03-18 20:40 ` Kevin Cernekee
2009-03-18 9:20 ` Artem Bityutskiy
2009-03-18 20:21 ` Kevin Cernekee
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=49C0ED16.1030601@nokia.com \
--to=adrian.hunter@nokia.com \
--cc=jwboyer@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=ricard.wanderlof@axis.com \
/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