From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: QNX EFS Driver Date: Fri, 23 Mar 2012 07:28:14 -0600 Message-ID: <20120323132813.GJ19570@parisc-linux.org> References: <4F6B6E63.8060200@ontika.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: Kai Bankett Return-path: Received: from palinux.external.hp.com ([192.25.206.14]:55150 "EHLO mail.parisc-linux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751740Ab2CWN2P (ORCPT ); Fri, 23 Mar 2012 09:28:15 -0400 Content-Disposition: inline In-Reply-To: <4F6B6E63.8060200@ontika.net> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Mar 22, 2012 at 07:24:35PM +0100, Kai Bankett wrote: > Due to the fact that the QNX EFS Filesystem is not using any fixed > blocks and just some fixed structures, I started fighting against the > buffer head blocksize. > I think I could pretty up the code a lot if there's any way to read N > Bytes from a device at position X. > Already started to look around, but could not really find something > giving me direct position access to a device. Sure; there's no need to use buffer_heads at all. You can call submit_bio() to do reads and writes. You do have to be 512-byte aligned, but that doesn't seem to be an issue for you. btrfs, ext4, gfs2, hfsplus, jfs, logfs, nfs, nilfs2, ocfs2 and xfs all use the submit_bio interface in case you need to see some examples. > At least I would be extremly thankful if someone could point me some > direction on how to better solve the chunkreading in qnxefs_file_read(). > It's currently buffer_head based with a blocksize of 512kb. The QNX EFS > - at least the files I got hold of - uses 16384 byte Blocks in 262144 > byte logical units. > So a file is split into chunks of up to 0x4000 size, but that chunks can > vary in size. (in case of the end of a logical unit, file end etc.) -- Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step."