Commit 2b0c7536 authored by Dave Kleikamp's avatar Dave Kleikamp

Merge jfs@jfs.bkbits.net:linux-2.5

into kleikamp.austin.ibm.com:/home/shaggy/bk/jfs-2.5
parents 1da3174f adaee16f
IBM's Journaled File System (JFS) for Linux version 1.0.15 IBM's Journaled File System (JFS) for Linux
JFS Homepage: http://oss.software.ibm.com/jfs/
Team members Team members
------------
Steve Best sbest@us.ibm.com Steve Best sbest@us.ibm.com
Dave Kleikamp shaggy@austin.ibm.com Dave Kleikamp shaggy@austin.ibm.com
Barry Arndt barndt@us.ibm.com Barry Arndt barndt@us.ibm.com
Christoph Hellwig hch@caldera.de Christoph Hellwig hch@infradead.org
Release February 15, 2002 (version 1.0.15)
This is our fifty-third release of IBM's Enterprise JFS technology port to Linux.
Beta 1 was release 0.1.0 on 12/8/2000, Beta 2 was release 0.2.0 on 3/7/2001,
Beta 3 was release 0.3.0 on 4/30/2001, and release 1.0.0 on 6/28/2001.
The changelog.jfs file contains detailed information of changes done in each source
code drop.
JFS has a source tree that can be built on 2.4.3 - 2.4.17 and 2.5.4 kernel.org
source trees.
Our current goal on the 2.5.x series of the kernel is to update to the latest
2.5.x version and only support the latest version of this kernel.
This will change when the distros start shipping the 2.5.x series of the kernel.
Our current goal on the 2.4.x series of the kernel is to continue to support
all of the kernels in this series as we do today.
There is an anonymous cvs access available for the JFS tree. The steps below are
what is needed to pull the JFS cvs tree from the oss.software.ibm.com server.
id anoncvs
password anoncvs
To checkout 2.4.x series of the JFS files do the following:
CVSROOT should be set to :pserver:anoncvs@oss.software.ibm.com:/usr/cvs/jfs
cvs checkout linux24
To checkout 2.5.2 series of the JFS files do the following:
CVSROOT should be set to :pserver:anoncvs@oss.software.ibm.com:/usr/cvs/jfs
cvs checkout linux25
To checkout the JFS utilities do the following:
CVSROOT should be set to :pserver:anoncvs@oss.software.ibm.com:/usr/cvs/jfs
cvs checkout jfsutils
The cvs tree contains the latest changes being done to JFS. To receive notification
of commits to the cvs tree, please send e-mail to linuxjfs@us.ibm.com stating that
you would like notifications sent to you.
The jfs-2.4-1.0.15-patch.tar.gz is the easiest way to get the latest file system
source code on your system. There are also patch files that can move your jfs source
code from one release to another. If you have release 1.0.14 and would like to move
to release 1.0.15 the patch file named jfs-2.4-1_0_14-to-1_0_15-patch.gz will do that.
The jfs-2.4-1.0.15-patch.tar.gz file contains a readme and patch files for different
levels of the 2.4 kernel. Please see the README in the jfs-2.4-1.0.15-patch.tar.gz
file for help on applying the two patch files.
The following files in the kernel source tree have been changed so JFS can be built.
The jfs-2.4-1.0.15.tar.gz source tar ball contains each of the files below with
the extension of the kernel level it is associated with. As an example, there are now
four Config.in files named Config.in-2.4.0, Config.in-2.4.5, Config.in-2.4.7 and
Config.in-2.4.17.
If you use the jfs-2.4-1.0.15.tar.gz to build JFS you must rename each of the
kernel files to the file names listed below. The standard kernel from www.kernel.org
is the source of the kernel files that are included in the jfs tar file.
In sub dir fs Config.in, Makefile
In sub dir fs/nls Config.in
In sub dir Documentation Configure.help, Changes
In sub dir Documentation/filesystems 00-INDEX
In sub dir linux MAINTAINERS
Please backup the above files before the JFS tar file is added to the kernel source The following mount options are supported:
tree. All JFS files are located in the include/linux/jfs or fs/jfs sub dirs.
Our development team has used the Linux kernel levels 2.4.3 - 2.4.17 kernels iocharset=name Character set to use for converting from Unicode to
with gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) ASCII. The default is compiled into the kernel as
for our port so far. A goal of the JFS team is to have JFS run on all architectures CONFIG_NLS_DEFAULT. Use iocharset=utf8 for UTF8
that Linux supports, there is no architecture specific code in JFS. JFS has been run translations. This requires CONFIG_NLS_UTF8 to be set
on the following architectures (x86, PowerPC, Alpha, s/390, ARM) so far. in the kernel .config file.
To make JFS build, during the "make config" step of building the kernel answer y to
the Prompt for development and/or incomplete code/drivers in the Code maturity level
options section. In the Filesystems section use the m for the answer to
JFS filesystem support (experimental) (CONFIG_JFS_FS) [Y/m/n?]
Build in /usr/src/linux with the command:
make modules
make modules_install
If you rebuild jfs.o after having mounted and unmounted a partition, "modprobe -r jfs"
will unload the old module.
For the file system debugging messages are being written to /var/log/messages.
Please see the readme in the utilities package for information about building
the JFS utilities.
JFS TODO list: JFS TODO list:
Plans for our near term development items Plans for our near term development items
- get defrag capabilities operational in the FS - implement online resize for extending JFS volumes
- get extendfs capabilities operational in the FS - enhance support for logfile on dedicated partition
- test EXTENDFS utility, for growing JFS partitions - get access control list functionality operational
- test defrag utility, calls file system to defrag the file system. - get extended attributes functionality operational
- add support for block sizes (512,1024,2048)
- add support for logfile on dedicated partition
Longer term work items Longer term work items
- get access control list functionality operational - implement defrag utility, for online defragmenting
- get extended attributes functionality operational
- add quota support - add quota support
- add support for block sizes (512,1024,2048)
Please send bugs, comments, cards and letters to linuxjfs@us.ibm.com. Please send bugs, comments, cards and letters to linuxjfs@us.ibm.com.
The JFS mailing list can be subscribed to by using the link labeled "Mail list Subscribe" The JFS mailing list can be subscribed to by using the link labeled
at our web page http://oss.software.ibm.com/jfs/. "Mail list Subscribe" at our web page http://oss.software.ibm.com/jfs/.
...@@ -45,15 +45,6 @@ int jfs_fsync(struct file *file, struct dentry *dentry, int datasync) ...@@ -45,15 +45,6 @@ int jfs_fsync(struct file *file, struct dentry *dentry, int datasync)
return rc ? -EIO : 0; return rc ? -EIO : 0;
} }
struct file_operations jfs_file_operations = {
open: generic_file_open,
llseek: generic_file_llseek,
write: generic_file_write,
read: generic_file_read,
mmap: generic_file_mmap,
fsync: jfs_fsync,
};
/* /*
* Guts of jfs_truncate. Called with locks already held. Can be called * Guts of jfs_truncate. Called with locks already held. Can be called
* with directory for truncating directory index table. * with directory for truncating directory index table.
...@@ -98,5 +89,14 @@ static void jfs_truncate(struct inode *ip) ...@@ -98,5 +89,14 @@ static void jfs_truncate(struct inode *ip)
} }
struct inode_operations jfs_file_inode_operations = { struct inode_operations jfs_file_inode_operations = {
truncate: jfs_truncate, .truncate = jfs_truncate,
};
struct file_operations jfs_file_operations = {
.open = generic_file_open,
.llseek = generic_file_llseek,
.write = generic_file_write,
.read = generic_file_read,
.mmap = generic_file_mmap,
.fsync = jfs_fsync,
}; };
...@@ -300,11 +300,11 @@ static int jfs_direct_IO(int rw, struct inode *inode, char *buf, ...@@ -300,11 +300,11 @@ static int jfs_direct_IO(int rw, struct inode *inode, char *buf,
} }
struct address_space_operations jfs_aops = { struct address_space_operations jfs_aops = {
readpage: jfs_readpage, .readpage = jfs_readpage,
writepage: jfs_writepage, .writepage = jfs_writepage,
sync_page: block_sync_page, .sync_page = block_sync_page,
prepare_write: jfs_prepare_write, .prepare_write = jfs_prepare_write,
commit_write: generic_commit_write, .commit_write = generic_commit_write,
bmap: jfs_bmap, .bmap = jfs_bmap,
direct_IO: jfs_direct_IO, .direct_IO = jfs_direct_IO,
}; };
...@@ -2368,7 +2368,7 @@ int dtRelocate(tid_t tid, struct inode *ip, s64 lmxaddr, pxd_t * opxd, ...@@ -2368,7 +2368,7 @@ int dtRelocate(tid_t tid, struct inode *ip, s64 lmxaddr, pxd_t * opxd,
xlen = lengthPXD(opxd); xlen = lengthPXD(opxd);
jEVENT(0, ("dtRelocate: lmxaddr:%Ld xaddr:%Ld:%Ld xlen:%d\n", jEVENT(0, ("dtRelocate: lmxaddr:%Ld xaddr:%Ld:%Ld xlen:%d\n",
lmxaddr, oxaddr, nxaddr, xlen)); (long long)lmxaddr, (long long)oxaddr, (long long)nxaddr, xlen));
/* /*
* 1. get the internal parent dtpage covering * 1. get the internal parent dtpage covering
...@@ -3044,7 +3044,7 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -3044,7 +3044,7 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
if (d_namleft == 0) { if (d_namleft == 0) {
jERROR(1,("JFS:Dtree error: " jERROR(1,("JFS:Dtree error: "
"ino = %ld, bn=%Ld, index = %d\n", "ino = %ld, bn=%Ld, index = %d\n",
ip->i_ino, bn, i)); (long)ip->i_ino, (long long)bn, i));
updateSuper(ip->i_sb, FM_DIRTY); updateSuper(ip->i_sb, FM_DIRTY);
goto skip_one; goto skip_one;
} }
...@@ -3101,6 +3101,7 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -3101,6 +3101,7 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
out: out:
kfree(d_name); kfree(d_name);
DT_PUTPAGE(mp); DT_PUTPAGE(mp);
return rc; return rc;
} }
......
...@@ -1080,8 +1080,8 @@ int lmLogOpen(struct super_block *sb, log_t ** logptr) ...@@ -1080,8 +1080,8 @@ int lmLogOpen(struct super_block *sb, log_t ** logptr)
* file system to log have 1-to-1 relationship; * file system to log have 1-to-1 relationship;
*/ */
log->bdev = sb->s_bdev;
log->flag = JFS_INLINELOG; log->flag = JFS_INLINELOG;
log->bdev = sb->s_bdev;
log->base = addressPXD(&JFS_SBI(sb)->logpxd); log->base = addressPXD(&JFS_SBI(sb)->logpxd);
log->size = lengthPXD(&JFS_SBI(sb)->logpxd) >> log->size = lengthPXD(&JFS_SBI(sb)->logpxd) >>
(L2LOGPSIZE - sb->s_blocksize_bits); (L2LOGPSIZE - sb->s_blocksize_bits);
......
...@@ -426,14 +426,15 @@ static int chkSuper(struct super_block *sb) ...@@ -426,14 +426,15 @@ static int chkSuper(struct super_block *sb)
*/ */
int updateSuper(struct super_block *sb, uint state) int updateSuper(struct super_block *sb, uint state)
{ {
int rc;
metapage_t *mp;
struct jfs_superblock *j_sb; struct jfs_superblock *j_sb;
struct jfs_sb_info *sbi = JFS_SBI(sb);
metapage_t *mp;
int rc;
/* /*
* Only fsck can fix dirty state * Only fsck can fix dirty state
*/ */
if (JFS_SBI(sb)->state == FM_DIRTY) if (sbi->state == FM_DIRTY)
return 0; return 0;
if ((rc = readSuper(sb, &mp))) if ((rc = readSuper(sb, &mp)))
...@@ -442,13 +443,12 @@ int updateSuper(struct super_block *sb, uint state) ...@@ -442,13 +443,12 @@ int updateSuper(struct super_block *sb, uint state)
j_sb = (struct jfs_superblock *) (mp->data); j_sb = (struct jfs_superblock *) (mp->data);
j_sb->s_state = cpu_to_le32(state); j_sb->s_state = cpu_to_le32(state);
JFS_SBI(sb)->state = state; sbi->state = state;
if (state == FM_MOUNT) { if (state == FM_MOUNT) {
/* record log's dev_t and mount serial number */ /* record log's dev_t and mount serial number */
j_sb->s_logdev = j_sb->s_logdev = cpu_to_le32(sbi->log->bdev->bd_dev);
cpu_to_le32(JFS_SBI(sb)->log->bdev->bd_dev); j_sb->s_logserial = cpu_to_le32(sbi->log->serial);
j_sb->s_logserial = cpu_to_le32(JFS_SBI(sb)->log->serial);
} else if (state == FM_CLEAN) { } else if (state == FM_CLEAN) {
/* /*
* If this volume is shared with OS/2, OS/2 will need to * If this volume is shared with OS/2, OS/2 will need to
......
...@@ -2824,10 +2824,7 @@ int jfs_lazycommit(void) ...@@ -2824,10 +2824,7 @@ int jfs_lazycommit(void)
* We can be running indefinately if other processors * We can be running indefinately if other processors
* are adding transactions to this list * are adding transactions to this list
*/ */
if (need_resched()) { cond_resched();
current->state = TASK_RUNNING;
schedule();
}
LAZY_LOCK(flags); LAZY_LOCK(flags);
} }
...@@ -2945,10 +2942,7 @@ int jfs_sync(void) ...@@ -2945,10 +2942,7 @@ int jfs_sync(void)
* Just to be safe. I don't know how * Just to be safe. I don't know how
* long we can run without blocking * long we can run without blocking
*/ */
if (need_resched()) { cond_resched();
current->state = TASK_RUNNING;
schedule();
}
TXN_LOCK(); TXN_LOCK();
} else { } else {
/* We can't get the write lock. It may /* We can't get the write lock. It may
......
...@@ -1437,19 +1437,19 @@ struct dentry *jfs_get_parent(struct dentry *dentry) ...@@ -1437,19 +1437,19 @@ struct dentry *jfs_get_parent(struct dentry *dentry)
} }
struct inode_operations jfs_dir_inode_operations = { struct inode_operations jfs_dir_inode_operations = {
create: jfs_create, .create = jfs_create,
lookup: jfs_lookup, .lookup = jfs_lookup,
link: jfs_link, .link = jfs_link,
unlink: jfs_unlink, .unlink = jfs_unlink,
symlink: jfs_symlink, .symlink = jfs_symlink,
mkdir: jfs_mkdir, .mkdir = jfs_mkdir,
rmdir: jfs_rmdir, .rmdir = jfs_rmdir,
mknod: jfs_mknod, .mknod = jfs_mknod,
rename: jfs_rename, .rename = jfs_rename,
}; };
struct file_operations jfs_dir_operations = { struct file_operations jfs_dir_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: jfs_readdir, .readdir = jfs_readdir,
fsync: jfs_fsync, .fsync = jfs_fsync,
}; };
...@@ -36,6 +36,10 @@ MODULE_LICENSE("GPL"); ...@@ -36,6 +36,10 @@ MODULE_LICENSE("GPL");
static kmem_cache_t * jfs_inode_cachep; static kmem_cache_t * jfs_inode_cachep;
static struct super_operations jfs_super_operations;
static struct export_operations jfs_export_operations;
static struct file_system_type jfs_fs_type;
int jfs_stop_threads; int jfs_stop_threads;
static pid_t jfsIOthread; static pid_t jfsIOthread;
static pid_t jfsCommitThread; static pid_t jfsCommitThread;
...@@ -223,21 +227,6 @@ int jfs_remount(struct super_block *sb, int *flags, char *data) ...@@ -223,21 +227,6 @@ int jfs_remount(struct super_block *sb, int *flags, char *data)
return 0; return 0;
} }
static struct super_operations jfs_super_operations = {
alloc_inode: jfs_alloc_inode,
destroy_inode: jfs_destroy_inode,
dirty_inode: jfs_dirty_inode,
write_inode: jfs_write_inode,
delete_inode: jfs_delete_inode,
put_super: jfs_put_super,
statfs: jfs_statfs,
remount_fs: jfs_remount,
};
static struct export_operations jfs_export_operations = {
get_parent: jfs_get_parent,
};
static int jfs_fill_super(struct super_block *sb, void *data, int silent) static int jfs_fill_super(struct super_block *sb, void *data, int silent)
{ {
struct jfs_sb_info *sbi; struct jfs_sb_info *sbi;
...@@ -362,12 +351,27 @@ static struct super_block *jfs_get_sb(struct file_system_type *fs_type, ...@@ -362,12 +351,27 @@ static struct super_block *jfs_get_sb(struct file_system_type *fs_type,
return get_sb_bdev(fs_type, flags, dev_name, data, jfs_fill_super); return get_sb_bdev(fs_type, flags, dev_name, data, jfs_fill_super);
} }
static struct super_operations jfs_super_operations = {
.alloc_inode = jfs_alloc_inode,
.destroy_inode = jfs_destroy_inode,
.dirty_inode = jfs_dirty_inode,
.write_inode = jfs_write_inode,
.delete_inode = jfs_delete_inode,
.put_super = jfs_put_super,
.statfs = jfs_statfs,
.remount_fs = jfs_remount,
};
static struct export_operations jfs_export_operations = {
.get_parent = jfs_get_parent,
};
static struct file_system_type jfs_fs_type = { static struct file_system_type jfs_fs_type = {
owner: THIS_MODULE, .owner = THIS_MODULE,
name: "jfs", .name = "jfs",
get_sb: jfs_get_sb, .get_sb = jfs_get_sb,
kill_sb: kill_block_super, .kill_sb = kill_block_super,
fs_flags: FS_REQUIRES_DEV, .fs_flags = FS_REQUIRES_DEV,
}; };
extern int metapage_init(void); extern int metapage_init(void);
......
...@@ -19,17 +19,6 @@ ...@@ -19,17 +19,6 @@
#include <linux/fs.h> #include <linux/fs.h>
#include "jfs_incore.h" #include "jfs_incore.h"
static int jfs_readlink(struct dentry *, char *buffer, int buflen);
static int jfs_follow_link(struct dentry *dentry, struct nameidata *nd);
/*
* symlinks can't do much...
*/
struct inode_operations jfs_symlink_inode_operations = {
readlink: jfs_readlink,
follow_link: jfs_follow_link,
};
static int jfs_follow_link(struct dentry *dentry, struct nameidata *nd) static int jfs_follow_link(struct dentry *dentry, struct nameidata *nd)
{ {
char *s = JFS_IP(dentry->d_inode)->i_inline; char *s = JFS_IP(dentry->d_inode)->i_inline;
...@@ -41,3 +30,9 @@ static int jfs_readlink(struct dentry *dentry, char *buffer, int buflen) ...@@ -41,3 +30,9 @@ static int jfs_readlink(struct dentry *dentry, char *buffer, int buflen)
char *s = JFS_IP(dentry->d_inode)->i_inline; char *s = JFS_IP(dentry->d_inode)->i_inline;
return vfs_readlink(dentry, buffer, buflen, s); return vfs_readlink(dentry, buffer, buflen, s);
} }
struct inode_operations jfs_symlink_inode_operations = {
.readlink = jfs_readlink,
.follow_link = jfs_follow_link,
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment