From: Christoph Hellwig <hch@infradead.org>
To: David Cross <david.cross@cypress.com>
Cc: Greg KH <gregkh@suse.de>,
hirofumi@mail.parknet.co.jp, linux-kernel@vger.kernel.org
Subject: Re: EXPORT_SYMBOL(fat_get_block)
Date: Fri, 13 Aug 2010 14:50:05 -0400 [thread overview]
Message-ID: <20100813185005.GA21112@infradead.org> (raw)
In-Reply-To: <1281724992.12189.16.camel@odc-laptop>
On Fri, Aug 13, 2010 at 11:43:12AM -0700, David Cross wrote:
> OK, I am trying to answer all questions on this topic that I am getting,
> but honestly I have not gotten a lot so far.
Seriously, I think there is absolutely no point in even arguing this.
A driver has absolutely no business looking into any filesystem layout.
> 1) receive all data, buffer it, then write the file. This is typically a
> slow process USB->Processor->SDRAM->Processor/DMA engine->Media
> 2) pre-allocate the file as soon as it knows that it is coming and how
> big it is, and then send the block addresses to an external DMA engine
> and let it transfer the data from the MTP host directly
>
> The West Bridge driver goes for option two for performance reasons. In
> doing this, it needs to get information from the file system on where to
> store the file.
And what if someone else changes the layout undernath you? Or uses
a different filesystem?
Basically you will have to introduce operations to the VFS to lock down
a file against layout changes and do DMA transfers. It's fine if you
only implement it for fat in the beginning, and just return an error
for others, although in general the implementation would be easily
extendable to other filesystems using generic code and the get_blocks
callbacks.
next prev parent reply other threads:[~2010-08-13 18:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-13 17:45 EXPORT_SYMBOL(fat_get_block) David Cross
2010-08-13 17:54 ` EXPORT_SYMBOL(fat_get_block) Greg KH
2010-08-13 18:43 ` EXPORT_SYMBOL(fat_get_block) David Cross
2010-08-13 18:50 ` Christoph Hellwig [this message]
2010-08-13 19:06 ` EXPORT_SYMBOL(fat_get_block) David Cross
2010-08-13 19:01 ` EXPORT_SYMBOL(fat_get_block) Greg KH
2010-08-13 19:17 ` EXPORT_SYMBOL(fat_get_block) David Cross
2010-08-13 19:28 ` EXPORT_SYMBOL(fat_get_block) Greg KH
2010-08-13 20:32 ` EXPORT_SYMBOL(fat_get_block) David Cross
2010-08-13 22:17 ` EXPORT_SYMBOL(fat_get_block) Greg KH
2010-08-13 23:22 ` EXPORT_SYMBOL(fat_get_block) David Cross
2010-08-14 0:25 ` EXPORT_SYMBOL(fat_get_block) Greg KH
2010-08-14 1:12 ` EXPORT_SYMBOL(fat_get_block) David Cross
2010-08-14 3:04 ` EXPORT_SYMBOL(fat_get_block) Greg KH
2010-08-15 22:57 ` EXPORT_SYMBOL(fat_get_block) Nelson Zhang
2010-08-17 14:54 ` EXPORT_SYMBOL(fat_get_block) Greg KH
2010-08-17 15:40 ` EXPORT_SYMBOL(fat_get_block) Christoph Hellwig
2010-08-17 15:54 ` EXPORT_SYMBOL(fat_get_block) Greg KH
2010-08-13 17:54 ` EXPORT_SYMBOL(fat_get_block) Greg KH
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=20100813185005.GA21112@infradead.org \
--to=hch@infradead.org \
--cc=david.cross@cypress.com \
--cc=gregkh@suse.de \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®