Re: EXPORT_SYMBOL(fat_get_block)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg KH
Date: Friday, August 13, 2010 - 3:17 pm

On Fri, Aug 13, 2010 at 01:32:15PM -0700, David Cross wrote:

What is "slower" here?  Please, real numbers.


With a gadgetfs driver underneath, right?  Or am I missing a piece here?


It's that "pre-allocation" that is the issue.


To "preallocate" a file, just open it and then mmap it and write away,
right?  Why can't userspace do that?


All while trying to transfer a file to the device over the USB
connection?  There's no reason you can't slow down the transfer if the
user is doing something else, right?


I still fail to see the use-case, and as you haven't backed it up with
any real numbers, that's an issue.


You can't create something that will not work for all filesystems.


ntfs is done by using a FUSE filesystem in userspace on a "raw" block
device.  You can't put that type of support in the kernel here :)


And that's all that is needed, right?


open a file, seek to the end, then mmap the whole thing.  That's how
userspace has been doing this for a long time, right?  I'm sure there
are other ways of doing it as well.


Ick, no, you would neve send down physical block numbers.

Look at how filesystems work from userspace, they achieve _very_ fast
speeds due to mmap and friends.  Heck, some people try to get the OS out
of the way entirely by just using direct I/O, or taking to the raw block
device.  Not by trying to allocate raw filesystem blocks from userspace,
that way lies madness.

thanks,

greg k-h
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
EXPORT_SYMBOL(fat_get_block), David Cross, (Fri Aug 13, 10:45 am)
Re: EXPORT_SYMBOL(fat_get_block), Greg KH, (Fri Aug 13, 10:54 am)
Re: EXPORT_SYMBOL(fat_get_block), Greg KH, (Fri Aug 13, 10:54 am)
Re: EXPORT_SYMBOL(fat_get_block), David Cross, (Fri Aug 13, 11:43 am)
Re: EXPORT_SYMBOL(fat_get_block), Christoph Hellwig, (Fri Aug 13, 11:50 am)
Re: EXPORT_SYMBOL(fat_get_block), Greg KH, (Fri Aug 13, 12:01 pm)
Re: EXPORT_SYMBOL(fat_get_block), David Cross, (Fri Aug 13, 12:06 pm)
Re: EXPORT_SYMBOL(fat_get_block), David Cross, (Fri Aug 13, 12:17 pm)
Re: EXPORT_SYMBOL(fat_get_block), Greg KH, (Fri Aug 13, 12:28 pm)
Re: EXPORT_SYMBOL(fat_get_block), David Cross, (Fri Aug 13, 1:32 pm)
Re: EXPORT_SYMBOL(fat_get_block), Greg KH, (Fri Aug 13, 3:17 pm)
Re: EXPORT_SYMBOL(fat_get_block), David Cross, (Fri Aug 13, 4:22 pm)
Re: EXPORT_SYMBOL(fat_get_block), Greg KH, (Fri Aug 13, 5:25 pm)
Re: EXPORT_SYMBOL(fat_get_block), David Cross, (Fri Aug 13, 6:12 pm)
Re: EXPORT_SYMBOL(fat_get_block), Greg KH, (Fri Aug 13, 8:04 pm)
RE: EXPORT_SYMBOL(fat_get_block), Nelson Zhang, (Sun Aug 15, 3:57 pm)
Re: EXPORT_SYMBOL(fat_get_block), Greg KH, (Tue Aug 17, 7:54 am)
Re: EXPORT_SYMBOL(fat_get_block), Christoph Hellwig, (Tue Aug 17, 8:40 am)
Re: EXPORT_SYMBOL(fat_get_block), Greg KH, (Tue Aug 17, 8:54 am)