title: Block Device driver read/write from user application
body: <p>I am trying to implement "simple file-system" for my personal experience. For this, I have created a block device driver with which I will perform read/write operations in unit of blocks. Now my question is how should I perform <strong>open, read, write and close</strong> operation on the block device from the user application.</p>
  
  <p>What I am actually looking for is a function with which I can open the block device <strong>/dev/sbd</strong> and it returns the <code>struct block_device</code>, if successful. And for the read/write functions, I can issue request to block device <code>struct request</code> with parameters as "buffer, sectore_number, numbe_of_sectors".</p>
  
  <p>Till now I only got <code>block_read()</code> and <code>block_write()</code> functions. But it seems that they are BSD specific. And I am using Debain.</p>
  
  <p>Anyone having idea about it? 
  Thanks.</p>