title: How to open files via block device
body: <p>From <a href="http://www.codeproject.com/Articles/460057/HDD-FS-O_SYNC-Throughput-vs-Integrity" rel="nofollow">this article</a>, it compares the write on a regular file system:</p>
  
  <pre><code>fd = open("/media/mount1/file", O_SYNC);
  </code></pre>
  
  <p>to the write on a block device:</p>
  
  <pre><code>fd = open("/dev/sda", O_SYNC)
  </code></pre>
  
  <p>How can it open the same <code>file</code> inside the HDD via block device?</p>