[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100817145403.GA28926@suse.de>
Date: Tue, 17 Aug 2010 07:54:03 -0700
From: Greg KH <gregkh@...e.de>
To: Nelson Zhang <nxz@...ress.com>
Cc: 'David Cross' <david.cross@...ress.com>,
hirofumi@...l.parknet.co.jp, linux-kernel@...r.kernel.org
Subject: Re: EXPORT_SYMBOL(fat_get_block)
On Mon, Aug 16, 2010 at 06:57:54AM +0800, Nelson Zhang wrote:
> Hi David, Greg,
>
> What I have done so far is following:
>
> 1. Open a file
> 2. Seek to the end of file
That just created a "sparse file"
> What I have not done is:
>
> 3. mmap the whole file.
>
> Without #3, the file is not allocated until I write to the file.
That is by design.
> I think we can try to use mmap to allocate the file but we still need
> a function that can get file block info once the file is allocated.
No, why would you want the file block info?
Just treat it as a file, using mmap() and all the other userspace
goodness that we have to get data to a file very quickly. You don't
need to preallocate the file from userspace, or anything else like that.
I suggest looking at some documentation on how to use the Unix file apis
properly to implement this better.
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists