[Captivate General] arris69:
dunno for what the driver/partition is used, had troubles (device freeze) with custom kernel an the original module from my GT-I9100 (ICS)

as note: device boots and working without the j4fs module in initramfs...

just for fun a little patch for kernel 3.0.15, just read operation tested.

Index: jv/llid_kernel.c
===================================================================
--- jv/llid_kernel.c (Revision 2075)
+++ jv/llid_kernel.c (Arbeitskopie)
@@ -95,7 +95,7 @@
set_fs(oldfs);
j4fs_filp->f_flags &= ~O_NONBLOCK;
if (ret < 0) {
- printk(1, "j4fs_filp->read() failed: %d\n", ret);
+ printk(KERN_WARNING "j4fs_filp->read() failed: %d\n", ret);
return J4FS_FAIL;
}
// J4FS for moviNAND merged from ROSSI
@@ -153,7 +153,7 @@
set_fs(oldfs);
j4fs_filp->f_flags &= ~O_NONBLOCK;
if (ret < 0) {
- printk(1, "j4fs_filp->write() failed: %d\n", ret);
+ printk(KERN_WARNING "j4fs_filp->write() failed: %d\n", ret);
return J4FS_FAIL;
}
// J4FS for moviNAND merged from ROSSI
Index: jv/j4fs_kernel.c
===================================================================
--- jv/j4fs_kernel.c (Revision 2075)
+++ jv/j4fs_kernel.c (Arbeitskopie)
@@ -10,7 +10,9 @@
* 2009.03 - Currently managed by SungHwan.yun <sunghwan.yun@samsung.com> @LDK@
*
*/
-#include <linux/smp_lock.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/smp.h>
#include <linux/time.h>
#include <linux/highuid.h>
#include <linux/pagemap.h>
@@ -53,6 +55,8 @@

#define Page_Uptodate(page) test_bit(PG_uptodate, &(page)->flags)

+#define init_MUTEX(sema) sema_init(sema,1)
+
extern j4fs_device_info device_info;
extern unsigned int j4fs_traceMask;
extern unsigned int j4fs_rw_start;
@@ -234,7 +238,7 @@
T(J4FS_TRACE_FS, ("start j4fs_write_begin\n"));

if(to>PAGE_CACHE_SIZE) {
- T(J4FS_TRACE_ALWAYS,("%s %d: page size overflow(pos,index,offset,len,to)=(%d,%d,%d,%d,%d)\n",__FUNCTION__,__LINE__,pos,index,offset,len,to));
+ T(J4FS_TRACE_ALWAYS,("%s %d: page size overflow(pos,index,offset,len,to)=(%llu,%lu,%d,%d,%d)\n",__FUNCTION__,__LINE__,pos,index,offset,len,to));
j4fs_panic("page size overflow");
return -ENOSPC;
}
@@ -1221,7 +1225,7 @@
struct j4fs_sb_info * sbi;
struct j4fs_super_block * es;
struct inode *root;
- u32 tmp, len,ret;
+ u32 ret;

T(J4FS_TRACE_FS,("%s %d\n",__FUNCTION__,__LINE__));

@@ -1322,11 +1326,11 @@
}

-int j4fs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, struct vfsmount *mnt)
+static struct dentry *j4fs_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data)
{
T(J4FS_TRACE_FS,("%s %d\n",__FUNCTION__,__LINE__));

- return get_sb_bdev(fs_type, flags, dev_name, data, j4fs_fill_super, mnt);
+ return mount_bdev(fs_type, flags, dev_name, data, j4fs_fill_super);
}

struct kmem_cache * j4fs_inode_cachep;
@@ -1386,7 +1390,7 @@
struct file_system_type j4fs_fs_type = {
.owner = THIS_MODULE,
.name = "j4fs",
- .get_sb = j4fs_get_sb,
+ .mount = j4fs_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
@@ -1416,9 +1420,16 @@
return -EINVAL;
}

-int j4fs_fsync(struct file *file, struct dentry *dentry, int datasync)
+static int j4fs_fsync(struct file *file, int datasync)
{
- return 0;
+ int rc = 0;
+
+ rc = generic_file_fsync(file, datasync);
+ if (rc)
+ goto out;
+ rc = vfs_fsync(file, datasync);
+out:
+ return rc;
}

int __init init_j4fs_fs(void)
Index: jv/j4fs.h
===================================================================
--- jv/j4fs.h (Revision 2075)
+++ jv/j4fs.h (Arbeitskopie)
@@ -167,6 +167,7 @@
#define J4FS_RECLAIM_RESET_UNUSED_SPACE
#define J4FS_TRANSACTION_LOGGING

+#undef T
#define T(mask, p) do { if ((mask) & (j4fs_traceMask | J4FS_TRACE_ALWAYS)) TOUT(p); } while (0)
#define POR(mask, p, q) do { if (((mask) & (j4fs_PORMask))&&!(--j4fs_PORCount)) {TOUT(p); while(1); }} while (0)

Index: jv/Makefile
===================================================================
--- jv/Makefile (Revision 2075)
+++ jv/Makefile (Arbeitskopie)
@@ -1,31 +1,5 @@
-##############################################################################
-# COPYRIGHT(C) : Samsung Electronics Co.Ltd, 2006-2011 ALL RIGHTS RESERVED
-# 2009.02 - Currently managed by JongMinKim <jm45.kim@samsung.com> , SungHwanYun <sunghwan.yun@samsung.com>
-##############################################################################
-# VERSION&DATE : Version 1.00 2009/02
-##############################################################################
+EXTRA_CFLAGS += -Wframe-larger-than=2048 -Wno-error=declaration-after-statement

-MOD_NAME = j4fs
+obj-$(CONFIG_J4FS) += j4fs.o

-ifneq ($(KERNELRELEASE), )
-
-EXTRA_CFLAGS += -I$(PRJROOT)/modules/include -I$(KDIR)/drivers/tfsr/Inc -I$(KDIR)/include -I$(KDIR)/include/linux -I$(KDIR)/include/asm -D__KERNEL
-
-obj-m := $(MOD_NAME).o
-
-$(MOD_NAME)-y := j4fs_kernel.o llid_kernel.o fsd_common.o
-
-else
-
-all:
- @$(MAKE) -C $(KDIR) \
- SUBDIRS=$(CURDIR) modules
-
-clean:
- rm -f *.o *.ko *.mod.c *~ .*.cmd
-
-install:
- @$(MAKE) --no-print-directory -C $(KDIR) \
- SUBDIRS=$(CURDIR) modules_install
-
-endif
+j4fs-objs := j4fs_kernel.o llid_kernel.o fsd_common.o