Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2415
b: refs/heads/master
c: 18b504e
h: refs/heads/master
i:
  2413: 7d17584
  2411: 7d32f19
  2407: ca57c06
  2399: c171c0a
v: v3
  • Loading branch information
Alexey Kuznetsov authored and David S. Miller committed Jun 21, 2005
1 parent 6ed3797 commit 48e4026
Show file tree
Hide file tree
Showing 25 changed files with 253 additions and 102 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2c6e5a839f92591a4bc6cac4a575d42151645af3
refs/heads/master: 18b504e25fd617bee8830d2cdcaff7fb7b5931bb
50 changes: 50 additions & 0 deletions trunk/fs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,56 @@ config SYSFS

Designers of embedded systems may wish to say N here to conserve space.

config DEVFS_FS
bool "/dev file system support (OBSOLETE)"
depends on EXPERIMENTAL
help
This is support for devfs, a virtual file system (like /proc) which
provides the file system interface to device drivers, normally found
in /dev. Devfs does not depend on major and minor number
allocations. Device drivers register entries in /dev which then
appear automatically, which means that the system administrator does
not have to create character and block special device files in the
/dev directory using the mknod command (or MAKEDEV script) anymore.

This is work in progress. If you want to use this, you *must* read
the material in <file:Documentation/filesystems/devfs/>, especially
the file README there.

Note that devfs no longer manages /dev/pts! If you are using UNIX98
ptys, you will also need to mount the /dev/pts filesystem (devpts).

Note that devfs has been obsoleted by udev,
<http://www.kernel.org/pub/linux/utils/kernel/hotplug/>.
It has been stripped down to a bare minimum and is only provided for
legacy installations that use its naming scheme which is
unfortunately different from the names normal Linux installations
use.

If unsure, say N.

config DEVFS_MOUNT
bool "Automatically mount at boot"
depends on DEVFS_FS
help
This option appears if you have CONFIG_DEVFS_FS enabled. Setting
this to 'Y' will make the kernel automatically mount devfs onto /dev
when the system is booted, before the init thread is started.
You can override this with the "devfs=nomount" boot option.

If unsure, say N.

config DEVFS_DEBUG
bool "Debug devfs"
depends on DEVFS_FS
help
If you say Y here, then the /dev file system code will generate
debugging messages. See the file
<file:Documentation/filesystems/devfs/boot-options> for more
details.

If unsure, say N.

config DEVPTS_FS_XATTR
bool "/dev/pts Extended Attributes"
depends on UNIX98_PTYS
Expand Down
6 changes: 4 additions & 2 deletions trunk/fs/jfs/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ static struct posix_acl *jfs_get_acl(struct inode *inode, int type)
if (!IS_ERR(acl))
*p_acl = posix_acl_dup(acl);
}
kfree(value);
if (value)
kfree(value);
return acl;
}

Expand Down Expand Up @@ -111,7 +112,8 @@ static int jfs_set_acl(struct inode *inode, int type, struct posix_acl *acl)
}
rc = __jfs_setxattr(inode, ea_name, value, size, 0);
out:
kfree(value);
if (value)
kfree(value);

if (!rc) {
if (*p_acl && (*p_acl != JFS_ACL_NOT_CACHED))
Expand Down
9 changes: 6 additions & 3 deletions trunk/fs/jfs/file.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) International Business Machines Corp., 2000-2002
* Portions Copyright (C) Christoph Hellwig, 2001-2002
* Copyright (c) International Business Machines Corp., 2000-2002
* Portions Copyright (c) Christoph Hellwig, 2001-2002
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -19,13 +19,16 @@

#include <linux/fs.h>
#include "jfs_incore.h"
#include "jfs_inode.h"
#include "jfs_dmap.h"
#include "jfs_txnmgr.h"
#include "jfs_xattr.h"
#include "jfs_acl.h"
#include "jfs_debug.h"


extern int jfs_commit_inode(struct inode *, int);
extern void jfs_truncate(struct inode *);

int jfs_fsync(struct file *file, struct dentry *dentry, int datasync)
{
struct inode *inode = dentry->d_inode;
Expand Down
11 changes: 9 additions & 2 deletions trunk/fs/jfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,21 @@
#include <linux/pagemap.h>
#include <linux/quotaops.h>
#include "jfs_incore.h"
#include "jfs_inode.h"
#include "jfs_filsys.h"
#include "jfs_imap.h"
#include "jfs_extent.h"
#include "jfs_unicode.h"
#include "jfs_debug.h"


extern struct inode_operations jfs_dir_inode_operations;
extern struct inode_operations jfs_file_inode_operations;
extern struct inode_operations jfs_symlink_inode_operations;
extern struct file_operations jfs_dir_operations;
extern struct file_operations jfs_file_operations;
struct address_space_operations jfs_aops;
extern int freeZeroLink(struct inode *);

void jfs_read_inode(struct inode *inode)
{
if (diRead(inode)) {
Expand Down Expand Up @@ -129,7 +136,7 @@ void jfs_delete_inode(struct inode *inode)
jfs_info("In jfs_delete_inode, inode = 0x%p", inode);

if (test_cflag(COMMIT_Freewmap, inode))
jfs_free_zero_link(inode);
freeZeroLink(inode);

diFree(inode);

Expand Down
10 changes: 10 additions & 0 deletions trunk/fs/jfs/jfs_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ void dump_mem(char *label, void *data, int length)

static struct proc_dir_entry *base;
#ifdef CONFIG_JFS_DEBUG
extern read_proc_t jfs_txanchor_read;

static int loglevel_read(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
Expand Down Expand Up @@ -95,6 +97,14 @@ static int loglevel_write(struct file *file, const char __user *buffer,
}
#endif


#ifdef CONFIG_JFS_STATISTICS
extern read_proc_t jfs_lmstats_read;
extern read_proc_t jfs_txstats_read;
extern read_proc_t jfs_xtstat_read;
extern read_proc_t jfs_mpstat_read;
#endif

static struct {
const char *name;
read_proc_t *read_fn;
Expand Down
15 changes: 4 additions & 11 deletions trunk/fs/jfs/jfs_debug.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) International Business Machines Corp., 2000-2002
* Portions Copyright (C) Christoph Hellwig, 2001-2002
* Copyright (c) International Business Machines Corp., 2000-2002
* Portions Copyright (c) Christoph Hellwig, 2001-2002
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -31,9 +31,7 @@
* CONFIG_JFS_DEBUG or CONFIG_JFS_STATISTICS is defined
*/
#if defined(CONFIG_PROC_FS) && (defined(CONFIG_JFS_DEBUG) || defined(CONFIG_JFS_STATISTICS))
#define PROC_FS_JFS
extern void jfs_proc_init(void);
extern void jfs_proc_clean(void);
#define PROC_FS_JFS
#endif

/*
Expand Down Expand Up @@ -67,8 +65,8 @@ extern void jfs_proc_clean(void);

extern int jfsloglevel;

/* dump memory contents */
extern void dump_mem(char *label, void *data, int length);
extern int jfs_txanchor_read(char *, char **, off_t, int, int *, void *);

/* information message: e.g., configuration, major event */
#define jfs_info(fmt, arg...) do { \
Expand Down Expand Up @@ -112,11 +110,6 @@ extern int jfs_txanchor_read(char *, char **, off_t, int, int *, void *);
* ----------
*/
#ifdef CONFIG_JFS_STATISTICS
extern int jfs_lmstats_read(char *, char **, off_t, int, int *, void *);
extern int jfs_txstats_read(char *, char **, off_t, int, int *, void *);
extern int jfs_mpstat_read(char *, char **, off_t, int, int *, void *);
extern int jfs_xtstat_read(char *, char **, off_t, int, int *, void *);

#define INCREMENT(x) ((x)++)
#define DECREMENT(x) ((x)--)
#define HIGHWATERMARK(x,y) ((x) = max((x), (y)))
Expand Down
9 changes: 9 additions & 0 deletions trunk/fs/jfs/jfs_dmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ int dbMount(struct inode *ipbmap)
int dbUnmount(struct inode *ipbmap, int mounterror)
{
struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap;
int i;

if (!(mounterror || isReadOnly(ipbmap)))
dbSync(ipbmap);
Expand All @@ -281,6 +282,14 @@ int dbUnmount(struct inode *ipbmap, int mounterror)
*/
truncate_inode_pages(ipbmap->i_mapping, 0);

/*
* Sanity Check
*/
for (i = 0; i < bmp->db_numag; i++)
if (atomic_read(&bmp->db_active[i]))
printk(KERN_ERR "dbUnmount: db_active[%d] = %d\n",
i, atomic_read(&bmp->db_active[i]));

/* free the memory for the in-memory bmap. */
kfree(bmp);

Expand Down
3 changes: 0 additions & 3 deletions trunk/fs/jfs/jfs_dtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2931,9 +2931,6 @@ static void add_missing_indices(struct inode *inode, s64 bn)
ASSERT(p->header.flag & BT_LEAF);

tlck = txLock(tid, inode, mp, tlckDTREE | tlckENTRY);
if (BT_IS_ROOT(mp))
tlck->type |= tlckBTROOT;

dtlck = (struct dt_lock *) &tlck->lock;

stbl = DT_GETSTBL(p);
Expand Down
7 changes: 6 additions & 1 deletion trunk/fs/jfs/jfs_extent.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <linux/fs.h>
#include <linux/quotaops.h>
#include "jfs_incore.h"
#include "jfs_inode.h"
#include "jfs_superblock.h"
#include "jfs_dmap.h"
#include "jfs_extent.h"
Expand All @@ -34,6 +33,12 @@ static int extBrealloc(struct inode *, s64, s64, s64 *, s64 *);
#endif
static s64 extRoundDown(s64 nb);

/*
* external references
*/
extern int jfs_commit_inode(struct inode *, int);


#define DPD(a) (printk("(a): %d\n",(a)))
#define DPC(a) (printk("(a): %c\n",(a)))
#define DPL1(a) \
Expand Down
6 changes: 5 additions & 1 deletion trunk/fs/jfs/jfs_imap.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
#include <linux/quotaops.h>

#include "jfs_incore.h"
#include "jfs_inode.h"
#include "jfs_filsys.h"
#include "jfs_dinode.h"
#include "jfs_dmap.h"
Expand All @@ -69,6 +68,11 @@
#define AG_LOCK(imap,agno) down(&imap->im_aglock[agno])
#define AG_UNLOCK(imap,agno) up(&imap->im_aglock[agno])

/*
* external references
*/
extern struct address_space_operations jfs_aops;

/*
* forward references
*/
Expand Down
1 change: 0 additions & 1 deletion trunk/fs/jfs/jfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <linux/fs.h>
#include <linux/quotaops.h>
#include "jfs_incore.h"
#include "jfs_inode.h"
#include "jfs_filsys.h"
#include "jfs_imap.h"
#include "jfs_dinode.h"
Expand Down
19 changes: 1 addition & 18 deletions trunk/fs/jfs/jfs_inode.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) International Business Machines Corp., 2000-2001
* Copyright (c) International Business Machines Corp., 2000-2001
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -19,22 +19,5 @@
#define _H_JFS_INODE

extern struct inode *ialloc(struct inode *, umode_t);
extern int jfs_fsync(struct file *, struct dentry *, int);
extern void jfs_read_inode(struct inode *);
extern int jfs_commit_inode(struct inode *, int);
extern int jfs_write_inode(struct inode*, int);
extern void jfs_delete_inode(struct inode *);
extern void jfs_dirty_inode(struct inode *);
extern void jfs_truncate(struct inode *);
extern void jfs_truncate_nolock(struct inode *, loff_t);
extern void jfs_free_zero_link(struct inode *);
extern struct dentry *jfs_get_parent(struct dentry *dentry);

extern struct address_space_operations jfs_aops;
extern struct inode_operations jfs_dir_inode_operations;
extern struct file_operations jfs_dir_operations;
extern struct inode_operations jfs_file_inode_operations;
extern struct file_operations jfs_file_operations;
extern struct inode_operations jfs_symlink_inode_operations;
extern struct dentry_operations jfs_ci_dentry_operations;
#endif /* _H_JFS_INODE */
14 changes: 10 additions & 4 deletions trunk/fs/jfs/jfs_logmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
#include "jfs_incore.h"
#include "jfs_filsys.h"
#include "jfs_metapage.h"
#include "jfs_superblock.h"
#include "jfs_txnmgr.h"
#include "jfs_debug.h"

Expand Down Expand Up @@ -167,6 +166,14 @@ static LIST_HEAD(jfs_external_logs);
static struct jfs_log *dummy_log = NULL;
static DECLARE_MUTEX(jfs_log_sem);

/*
* external references
*/
extern void txLazyUnlock(struct tblock * tblk);
extern int jfs_stop_threads;
extern struct completion jfsIOwait;
extern int jfs_tlocks_low;

/*
* forward references
*/
Expand Down Expand Up @@ -1617,8 +1624,6 @@ void jfs_flush_journal(struct jfs_log *log, int wait)
}
}
assert(list_empty(&log->cqueue));

#ifdef CONFIG_JFS_DEBUG
if (!list_empty(&log->synclist)) {
struct logsyncblk *lp;

Expand All @@ -1633,8 +1638,9 @@ void jfs_flush_journal(struct jfs_log *log, int wait)
dump_mem("orphan tblock", lp,
sizeof(struct tblock));
}
// current->state = TASK_INTERRUPTIBLE;
// schedule();
}
#endif
//assert(list_empty(&log->synclist));
clear_bit(log_FLUSH, &log->flag);
}
Expand Down
2 changes: 0 additions & 2 deletions trunk/fs/jfs/jfs_logmgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,6 @@ extern int lmLogClose(struct super_block *sb);
extern int lmLogShutdown(struct jfs_log * log);
extern int lmLogInit(struct jfs_log * log);
extern int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize);
extern int lmGroupCommit(struct jfs_log *, struct tblock *);
extern int jfsIOWait(void *);
extern void jfs_flush_journal(struct jfs_log * log, int wait);
extern void jfs_syncpt(struct jfs_log *log);

Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/jfs/jfs_metapage.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ static void init_once(void *foo, kmem_cache_t *cachep, unsigned long flags)
}
}

static inline struct metapage *alloc_metapage(unsigned int gfp_mask)
static inline struct metapage *alloc_metapage(int gfp_mask)
{
return mempool_alloc(metapage_mempool, gfp_mask);
}
Expand Down Expand Up @@ -726,12 +726,12 @@ void force_metapage(struct metapage *mp)
page_cache_release(page);
}

void hold_metapage(struct metapage *mp)
extern void hold_metapage(struct metapage *mp)
{
lock_page(mp->page);
}

void put_metapage(struct metapage *mp)
extern void put_metapage(struct metapage *mp)
{
if (mp->count || mp->nohomeok) {
/* Someone else will release this */
Expand Down
Loading

0 comments on commit 48e4026

Please sign in to comment.