From mboxrd@z Thu Jan 1 00:00:00 1970 From: dhylands@gmail.com (Dave Hylands) Date: Tue, 7 Jun 2011 07:53:28 -0700 Subject: mmap on a block device In-Reply-To: References: Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi Kaustubh, Replying to all this time... On Mon, Jun 6, 2011 at 11:44 PM, Kaustubh Ashtekar wrote: > Done. mmap was successful. > Is it a good idea to mmap a block device. A block device being much bigger > than the available virtual address space, I will have to map it multiple > times while working on various parts of the block device. What it means to mmap any device is quite arbitrary and entirely up to the driver writer. All that mmaping means is to take some memory that the driver allocated in kernel space and make that memory available into user space. The contents of the memory is entirely up to the driver. Maybe you put statistics in there? Maybe you make it map in the data storage your block device is front-ending? It's up to the driver writer to decide what goes there and whether it makes sense or not. -- Dave Hylands Shuswap, BC, Canada http://www.davehylands.com