how to implement prepare_write, commit_write for ubifs

Artem Bityutskiy dedekind at infradead.org
Wed Jun 17 04:29:24 EDT 2009


On Wed, 2009-06-17 at 15:53 +0800, Ivan Chan wrote:
> Hi all,
> 
> I am porting UBIFS/UBI to 2.6.4 kernel, however, 2.6.4 kernel requires
> prepare_write, commit_write in address_space_operations (defined in
> include/linux/fs.h),
> but it is no longer exists in 2.6.2x kernel.
> 
> How can I rewrite these function for 2.6.4 kernel?
> 
> In 2.6.2x, there is similar function write_begin, and write_end, but
> the API requires
> struct address_space *mapping,  struct page **pagep, void **fsdata,
> 
> Is that possible and how to provide this argument in 2.6.4 kernel?

ATM we support UBIFS back-ports from v2.6.24 to v2.6.30.

The change of the address space operation happened between 2.6.23 and
2.6.24.

In the paste, we also supported UBIFS back-ports for kerneld
2.6.21-2.6.23. But then we dropped them because it became increasingly
difficult to back-port stuff there.

So what would suggest you do is:

a). Start with the old and unsupported 2.6.23 UBIFS back-port which you
may find here: git://git.infradead.org/users/dedekind/ubifs-v2.6.23.git

b). Back-port this UBIFS 2.6.23 stuff to your ancient 2.6.4, it should
be easier to do comparing to back-porting the newest stuff.

c). Back port the rest of the UBIFS changes/fixes from the latest
kernels, e.g., from the UBIFS 2.6.30 back-port.

The back-ports URLS may be found here:
http://www.linux-mtd.infradead.org/doc/ubifs.html#L_source

Or just see here:
http://git.infradead.org/

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list