Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
1868f4aa
Commit
1868f4aa
authored
May 04, 2005
by
Dave Kleikamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JFS: fix sparse warnings by moving extern declarations to headers
Signed-off-by:
Dave Kleikamp
<
shaggy@austin.ibm.com
>
parent
6b6bf510
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
89 additions
and
181 deletions
+89
-181
fs/jfs/file.c
fs/jfs/file.c
+3
-6
fs/jfs/inode.c
fs/jfs/inode.c
+2
-9
fs/jfs/jfs_debug.c
fs/jfs/jfs_debug.c
+0
-10
fs/jfs/jfs_debug.h
fs/jfs/jfs_debug.h
+11
-4
fs/jfs/jfs_extent.c
fs/jfs/jfs_extent.c
+1
-6
fs/jfs/jfs_imap.c
fs/jfs/jfs_imap.c
+1
-5
fs/jfs/jfs_inode.c
fs/jfs/jfs_inode.c
+1
-0
fs/jfs/jfs_inode.h
fs/jfs/jfs_inode.h
+18
-1
fs/jfs/jfs_logmgr.c
fs/jfs/jfs_logmgr.c
+1
-8
fs/jfs/jfs_logmgr.h
fs/jfs/jfs_logmgr.h
+2
-0
fs/jfs/jfs_metapage.c
fs/jfs/jfs_metapage.c
+2
-2
fs/jfs/jfs_metapage.h
fs/jfs/jfs_metapage.h
+4
-2
fs/jfs/jfs_superblock.h
fs/jfs/jfs_superblock.h
+11
-0
fs/jfs/jfs_txnmgr.c
fs/jfs/jfs_txnmgr.c
+1
-39
fs/jfs/jfs_txnmgr.h
fs/jfs/jfs_txnmgr.h
+22
-30
fs/jfs/namei.c
fs/jfs/namei.c
+6
-22
fs/jfs/super.c
fs/jfs/super.c
+1
-36
fs/jfs/symlink.c
fs/jfs/symlink.c
+2
-1
No files found.
fs/jfs/file.c
View file @
1868f4aa
/*
/*
* Copyright (
c
) International Business Machines Corp., 2000-2002
* Copyright (
C
) International Business Machines Corp., 2000-2002
* Portions Copyright (
c
) Christoph Hellwig, 2001-2002
* Portions Copyright (
C
) Christoph Hellwig, 2001-2002
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
...
@@ -19,16 +19,13 @@
...
@@ -19,16 +19,13 @@
#include <linux/fs.h>
#include <linux/fs.h>
#include "jfs_incore.h"
#include "jfs_incore.h"
#include "jfs_inode.h"
#include "jfs_dmap.h"
#include "jfs_dmap.h"
#include "jfs_txnmgr.h"
#include "jfs_txnmgr.h"
#include "jfs_xattr.h"
#include "jfs_xattr.h"
#include "jfs_acl.h"
#include "jfs_acl.h"
#include "jfs_debug.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
)
int
jfs_fsync
(
struct
file
*
file
,
struct
dentry
*
dentry
,
int
datasync
)
{
{
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
inode
*
inode
=
dentry
->
d_inode
;
...
...
fs/jfs/inode.c
View file @
1868f4aa
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include <linux/pagemap.h>
#include <linux/pagemap.h>
#include <linux/quotaops.h>
#include <linux/quotaops.h>
#include "jfs_incore.h"
#include "jfs_incore.h"
#include "jfs_inode.h"
#include "jfs_filsys.h"
#include "jfs_filsys.h"
#include "jfs_imap.h"
#include "jfs_imap.h"
#include "jfs_extent.h"
#include "jfs_extent.h"
...
@@ -30,14 +31,6 @@
...
@@ -30,14 +31,6 @@
#include "jfs_debug.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
)
void
jfs_read_inode
(
struct
inode
*
inode
)
{
{
if
(
diRead
(
inode
))
{
if
(
diRead
(
inode
))
{
...
@@ -136,7 +129,7 @@ void jfs_delete_inode(struct inode *inode)
...
@@ -136,7 +129,7 @@ void jfs_delete_inode(struct inode *inode)
jfs_info
(
"In jfs_delete_inode, inode = 0x%p"
,
inode
);
jfs_info
(
"In jfs_delete_inode, inode = 0x%p"
,
inode
);
if
(
test_cflag
(
COMMIT_Freewmap
,
inode
))
if
(
test_cflag
(
COMMIT_Freewmap
,
inode
))
freeZeroL
ink
(
inode
);
jfs_free_zero_l
ink
(
inode
);
diFree
(
inode
);
diFree
(
inode
);
...
...
fs/jfs/jfs_debug.c
View file @
1868f4aa
...
@@ -58,8 +58,6 @@ void dump_mem(char *label, void *data, int length)
...
@@ -58,8 +58,6 @@ void dump_mem(char *label, void *data, int length)
static
struct
proc_dir_entry
*
base
;
static
struct
proc_dir_entry
*
base
;
#ifdef CONFIG_JFS_DEBUG
#ifdef CONFIG_JFS_DEBUG
extern
read_proc_t
jfs_txanchor_read
;
static
int
loglevel_read
(
char
*
page
,
char
**
start
,
off_t
off
,
static
int
loglevel_read
(
char
*
page
,
char
**
start
,
off_t
off
,
int
count
,
int
*
eof
,
void
*
data
)
int
count
,
int
*
eof
,
void
*
data
)
{
{
...
@@ -97,14 +95,6 @@ static int loglevel_write(struct file *file, const char __user *buffer,
...
@@ -97,14 +95,6 @@ static int loglevel_write(struct file *file, const char __user *buffer,
}
}
#endif
#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
{
static
struct
{
const
char
*
name
;
const
char
*
name
;
read_proc_t
*
read_fn
;
read_proc_t
*
read_fn
;
...
...
fs/jfs/jfs_debug.h
View file @
1868f4aa
/*
/*
* Copyright (
c
) International Business Machines Corp., 2000-2002
* Copyright (
C
) International Business Machines Corp., 2000-2002
* Portions Copyright (
c
) Christoph Hellwig, 2001-2002
* Portions Copyright (
C
) Christoph Hellwig, 2001-2002
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
...
@@ -31,7 +31,9 @@
...
@@ -31,7 +31,9 @@
* CONFIG_JFS_DEBUG or CONFIG_JFS_STATISTICS is defined
* CONFIG_JFS_DEBUG or CONFIG_JFS_STATISTICS is defined
*/
*/
#if defined(CONFIG_PROC_FS) && (defined(CONFIG_JFS_DEBUG) || defined(CONFIG_JFS_STATISTICS))
#if defined(CONFIG_PROC_FS) && (defined(CONFIG_JFS_DEBUG) || defined(CONFIG_JFS_STATISTICS))
#define PROC_FS_JFS
#define PROC_FS_JFS
extern
void
jfs_proc_init
(
void
);
extern
void
jfs_proc_clean
(
void
);
#endif
#endif
/*
/*
...
@@ -65,8 +67,8 @@
...
@@ -65,8 +67,8 @@
extern
int
jfsloglevel
;
extern
int
jfsloglevel
;
/* dump memory contents */
extern
void
dump_mem
(
char
*
label
,
void
*
data
,
int
length
);
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 */
/* information message: e.g., configuration, major event */
#define jfs_info(fmt, arg...) do { \
#define jfs_info(fmt, arg...) do { \
...
@@ -110,6 +112,11 @@ extern void dump_mem(char *label, void *data, int length);
...
@@ -110,6 +112,11 @@ extern void dump_mem(char *label, void *data, int length);
* ----------
* ----------
*/
*/
#ifdef CONFIG_JFS_STATISTICS
#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 INCREMENT(x) ((x)++)
#define DECREMENT(x) ((x)--)
#define DECREMENT(x) ((x)--)
#define HIGHWATERMARK(x,y) ((x) = max((x), (y)))
#define HIGHWATERMARK(x,y) ((x) = max((x), (y)))
...
...
fs/jfs/jfs_extent.c
View file @
1868f4aa
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#include <linux/fs.h>
#include <linux/fs.h>
#include <linux/quotaops.h>
#include <linux/quotaops.h>
#include "jfs_incore.h"
#include "jfs_incore.h"
#include "jfs_inode.h"
#include "jfs_superblock.h"
#include "jfs_superblock.h"
#include "jfs_dmap.h"
#include "jfs_dmap.h"
#include "jfs_extent.h"
#include "jfs_extent.h"
...
@@ -33,12 +34,6 @@ static int extBrealloc(struct inode *, s64, s64, s64 *, s64 *);
...
@@ -33,12 +34,6 @@ static int extBrealloc(struct inode *, s64, s64, s64 *, s64 *);
#endif
#endif
static
s64
extRoundDown
(
s64
nb
);
static
s64
extRoundDown
(
s64
nb
);
/*
* external references
*/
extern
int
jfs_commit_inode
(
struct
inode
*
,
int
);
#define DPD(a) (printk("(a): %d\n",(a)))
#define DPD(a) (printk("(a): %d\n",(a)))
#define DPC(a) (printk("(a): %c\n",(a)))
#define DPC(a) (printk("(a): %c\n",(a)))
#define DPL1(a) \
#define DPL1(a) \
...
...
fs/jfs/jfs_imap.c
View file @
1868f4aa
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
#include <linux/quotaops.h>
#include <linux/quotaops.h>
#include "jfs_incore.h"
#include "jfs_incore.h"
#include "jfs_inode.h"
#include "jfs_filsys.h"
#include "jfs_filsys.h"
#include "jfs_dinode.h"
#include "jfs_dinode.h"
#include "jfs_dmap.h"
#include "jfs_dmap.h"
...
@@ -68,11 +69,6 @@
...
@@ -68,11 +69,6 @@
#define AG_LOCK(imap,agno) down(&imap->im_aglock[agno])
#define AG_LOCK(imap,agno) down(&imap->im_aglock[agno])
#define AG_UNLOCK(imap,agno) up(&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
* forward references
*/
*/
...
...
fs/jfs/jfs_inode.c
View file @
1868f4aa
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#include <linux/fs.h>
#include <linux/fs.h>
#include <linux/quotaops.h>
#include <linux/quotaops.h>
#include "jfs_incore.h"
#include "jfs_incore.h"
#include "jfs_inode.h"
#include "jfs_filsys.h"
#include "jfs_filsys.h"
#include "jfs_imap.h"
#include "jfs_imap.h"
#include "jfs_dinode.h"
#include "jfs_dinode.h"
...
...
fs/jfs/jfs_inode.h
View file @
1868f4aa
/*
/*
* 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
* 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
* it under the terms of the GNU General Public License as published by
...
@@ -19,5 +19,22 @@
...
@@ -19,5 +19,22 @@
#define _H_JFS_INODE
#define _H_JFS_INODE
extern
struct
inode
*
ialloc
(
struct
inode
*
,
umode_t
);
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 */
#endif
/* _H_JFS_INODE */
fs/jfs/jfs_logmgr.c
View file @
1868f4aa
...
@@ -71,6 +71,7 @@
...
@@ -71,6 +71,7 @@
#include "jfs_incore.h"
#include "jfs_incore.h"
#include "jfs_filsys.h"
#include "jfs_filsys.h"
#include "jfs_metapage.h"
#include "jfs_metapage.h"
#include "jfs_superblock.h"
#include "jfs_txnmgr.h"
#include "jfs_txnmgr.h"
#include "jfs_debug.h"
#include "jfs_debug.h"
...
@@ -166,14 +167,6 @@ static LIST_HEAD(jfs_external_logs);
...
@@ -166,14 +167,6 @@ static LIST_HEAD(jfs_external_logs);
static
struct
jfs_log
*
dummy_log
=
NULL
;
static
struct
jfs_log
*
dummy_log
=
NULL
;
static
DECLARE_MUTEX
(
jfs_log_sem
);
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
* forward references
*/
*/
...
...
fs/jfs/jfs_logmgr.h
View file @
1868f4aa
...
@@ -507,6 +507,8 @@ extern int lmLogClose(struct super_block *sb);
...
@@ -507,6 +507,8 @@ extern int lmLogClose(struct super_block *sb);
extern
int
lmLogShutdown
(
struct
jfs_log
*
log
);
extern
int
lmLogShutdown
(
struct
jfs_log
*
log
);
extern
int
lmLogInit
(
struct
jfs_log
*
log
);
extern
int
lmLogInit
(
struct
jfs_log
*
log
);
extern
int
lmLogFormat
(
struct
jfs_log
*
log
,
s64
logAddress
,
int
logSize
);
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_flush_journal
(
struct
jfs_log
*
log
,
int
wait
);
extern
void
jfs_syncpt
(
struct
jfs_log
*
log
);
extern
void
jfs_syncpt
(
struct
jfs_log
*
log
);
...
...
fs/jfs/jfs_metapage.c
View file @
1868f4aa
...
@@ -726,12 +726,12 @@ void force_metapage(struct metapage *mp)
...
@@ -726,12 +726,12 @@ void force_metapage(struct metapage *mp)
page_cache_release
(
page
);
page_cache_release
(
page
);
}
}
extern
void
hold_metapage
(
struct
metapage
*
mp
)
void
hold_metapage
(
struct
metapage
*
mp
)
{
{
lock_page
(
mp
->
page
);
lock_page
(
mp
->
page
);
}
}
extern
void
put_metapage
(
struct
metapage
*
mp
)
void
put_metapage
(
struct
metapage
*
mp
)
{
{
if
(
mp
->
count
||
mp
->
nohomeok
)
{
if
(
mp
->
count
||
mp
->
nohomeok
)
{
/* Someone else will release this */
/* Someone else will release this */
...
...
fs/jfs/jfs_metapage.h
View file @
1868f4aa
/*
/*
* Copyright (
c
) International Business Machines Corp., 2000-2002
* Copyright (
C
) International Business Machines Corp., 2000-2002
* Portions Copyright (
c
) Christoph Hellwig, 2001-2002
* Portions Copyright (
C
) Christoph Hellwig, 2001-2002
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
...
@@ -58,6 +58,8 @@ struct metapage {
...
@@ -58,6 +58,8 @@ struct metapage {
#define mark_metapage_dirty(mp) set_bit(META_dirty, &(mp)->flag)
#define mark_metapage_dirty(mp) set_bit(META_dirty, &(mp)->flag)
/* function prototypes */
/* function prototypes */
extern
int
metapage_init
(
void
);
extern
void
metapage_exit
(
void
);
extern
struct
metapage
*
__get_metapage
(
struct
inode
*
inode
,
extern
struct
metapage
*
__get_metapage
(
struct
inode
*
inode
,
unsigned
long
lblock
,
unsigned
int
size
,
unsigned
long
lblock
,
unsigned
int
size
,
int
absolute
,
unsigned
long
new
);
int
absolute
,
unsigned
long
new
);
...
...
fs/jfs/jfs_superblock.h
View file @
1868f4aa
...
@@ -109,5 +109,16 @@ struct jfs_superblock {
...
@@ -109,5 +109,16 @@ struct jfs_superblock {
extern
int
readSuper
(
struct
super_block
*
,
struct
buffer_head
**
);
extern
int
readSuper
(
struct
super_block
*
,
struct
buffer_head
**
);
extern
int
updateSuper
(
struct
super_block
*
,
uint
);
extern
int
updateSuper
(
struct
super_block
*
,
uint
);
extern
void
jfs_error
(
struct
super_block
*
,
const
char
*
,
...);
extern
void
jfs_error
(
struct
super_block
*
,
const
char
*
,
...);
extern
int
jfs_mount
(
struct
super_block
*
);
extern
int
jfs_mount_rw
(
struct
super_block
*
,
int
);
extern
int
jfs_umount
(
struct
super_block
*
);
extern
int
jfs_umount_rw
(
struct
super_block
*
);
extern
int
jfs_stop_threads
;
extern
struct
completion
jfsIOwait
;
extern
wait_queue_head_t
jfs_IO_thread_wait
;
extern
wait_queue_head_t
jfs_commit_thread_wait
;
extern
wait_queue_head_t
jfs_sync_thread_wait
;
extern
int
jfs_extendfs
(
struct
super_block
*
,
s64
,
int
);
#endif
/*_H_JFS_SUPERBLOCK */
#endif
/*_H_JFS_SUPERBLOCK */
fs/jfs/jfs_txnmgr.c
View file @
1868f4aa
...
@@ -42,7 +42,6 @@
...
@@ -42,7 +42,6 @@
* hold on to mp+lock thru update of maps
* hold on to mp+lock thru update of maps
*/
*/
#include <linux/fs.h>
#include <linux/fs.h>
#include <linux/vmalloc.h>
#include <linux/vmalloc.h>
#include <linux/smp_lock.h>
#include <linux/smp_lock.h>
...
@@ -51,6 +50,7 @@
...
@@ -51,6 +50,7 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/moduleparam.h>
#include "jfs_incore.h"
#include "jfs_incore.h"
#include "jfs_inode.h"
#include "jfs_filsys.h"
#include "jfs_filsys.h"
#include "jfs_metapage.h"
#include "jfs_metapage.h"
#include "jfs_dinode.h"
#include "jfs_dinode.h"
...
@@ -109,7 +109,6 @@ static int TxLockHWM; /* High water mark for number of txLocks used */
...
@@ -109,7 +109,6 @@ static int TxLockHWM; /* High water mark for number of txLocks used */
static
int
TxLockVHWM
;
/* Very High water mark */
static
int
TxLockVHWM
;
/* Very High water mark */
struct
tlock
*
TxLock
;
/* transaction lock table */
struct
tlock
*
TxLock
;
/* transaction lock table */
/*
/*
* transaction management lock
* transaction management lock
*/
*/
...
@@ -149,7 +148,6 @@ static inline void TXN_SLEEP_DROP_LOCK(wait_queue_head_t * event)
...
@@ -149,7 +148,6 @@ static inline void TXN_SLEEP_DROP_LOCK(wait_queue_head_t * event)
#define TXN_WAKEUP(event) wake_up_all(event)
#define TXN_WAKEUP(event) wake_up_all(event)
/*
/*
* statistics
* statistics
*/
*/
...
@@ -161,16 +159,6 @@ static struct {
...
@@ -161,16 +159,6 @@ static struct {
int
waitlock
;
/* 4: # of tlock wait */
int
waitlock
;
/* 4: # of tlock wait */
}
stattx
;
}
stattx
;
/*
* external references
*/
extern
int
lmGroupCommit
(
struct
jfs_log
*
,
struct
tblock
*
);
extern
int
jfs_commit_inode
(
struct
inode
*
,
int
);
extern
int
jfs_stop_threads
;
extern
struct
completion
jfsIOwait
;
/*
/*
* forward references
* forward references
*/
*/
...
@@ -358,7 +346,6 @@ void txExit(void)
...
@@ -358,7 +346,6 @@ void txExit(void)
TxBlock
=
NULL
;
TxBlock
=
NULL
;
}
}
/*
/*
* NAME: txBegin()
* NAME: txBegin()
*
*
...
@@ -460,7 +447,6 @@ tid_t txBegin(struct super_block *sb, int flag)
...
@@ -460,7 +447,6 @@ tid_t txBegin(struct super_block *sb, int flag)
return
t
;
return
t
;
}
}
/*
/*
* NAME: txBeginAnon()
* NAME: txBeginAnon()
*
*
...
@@ -503,7 +489,6 @@ void txBeginAnon(struct super_block *sb)
...
@@ -503,7 +489,6 @@ void txBeginAnon(struct super_block *sb)
TXN_UNLOCK
();
TXN_UNLOCK
();
}
}
/*
/*
* txEnd()
* txEnd()
*
*
...
@@ -592,7 +577,6 @@ void txEnd(tid_t tid)
...
@@ -592,7 +577,6 @@ void txEnd(tid_t tid)
TXN_WAKEUP
(
&
TxAnchor
.
freewait
);
TXN_WAKEUP
(
&
TxAnchor
.
freewait
);
}
}
/*
/*
* txLock()
* txLock()
*
*
...
@@ -868,7 +852,6 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp,
...
@@ -868,7 +852,6 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp,
return
NULL
;
return
NULL
;
}
}
/*
/*
* NAME: txRelease()
* NAME: txRelease()
*
*
...
@@ -908,7 +891,6 @@ static void txRelease(struct tblock * tblk)
...
@@ -908,7 +891,6 @@ static void txRelease(struct tblock * tblk)
TXN_UNLOCK
();
TXN_UNLOCK
();
}
}
/*
/*
* NAME: txUnlock()
* NAME: txUnlock()
*
*
...
@@ -996,7 +978,6 @@ static void txUnlock(struct tblock * tblk)
...
@@ -996,7 +978,6 @@ static void txUnlock(struct tblock * tblk)
}
}
}
}
/*
/*
* txMaplock()
* txMaplock()
*
*
...
@@ -1069,7 +1050,6 @@ struct tlock *txMaplock(tid_t tid, struct inode *ip, int type)
...
@@ -1069,7 +1050,6 @@ struct tlock *txMaplock(tid_t tid, struct inode *ip, int type)
return
tlck
;
return
tlck
;
}
}
/*
/*
* txLinelock()
* txLinelock()
*
*
...
@@ -1103,8 +1083,6 @@ struct linelock *txLinelock(struct linelock * tlock)
...
@@ -1103,8 +1083,6 @@ struct linelock *txLinelock(struct linelock * tlock)
return
linelock
;
return
linelock
;
}
}
/*
/*
* transaction commit management
* transaction commit management
* -----------------------------
* -----------------------------
...
@@ -1373,7 +1351,6 @@ int txCommit(tid_t tid, /* transaction identifier */
...
@@ -1373,7 +1351,6 @@ int txCommit(tid_t tid, /* transaction identifier */
return
rc
;
return
rc
;
}
}
/*
/*
* NAME: txLog()
* NAME: txLog()
*
*
...
@@ -1437,7 +1414,6 @@ static int txLog(struct jfs_log * log, struct tblock * tblk, struct commit * cd)
...
@@ -1437,7 +1414,6 @@ static int txLog(struct jfs_log * log, struct tblock * tblk, struct commit * cd)
return
rc
;
return
rc
;
}
}
/*
/*
* diLog()
* diLog()
*
*
...
@@ -1465,7 +1441,6 @@ static int diLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
...
@@ -1465,7 +1441,6 @@ static int diLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
if
(
tlck
->
type
&
tlckENTRY
)
{
if
(
tlck
->
type
&
tlckENTRY
)
{
/* log after-image for logredo(): */
/* log after-image for logredo(): */
lrd
->
type
=
cpu_to_le16
(
LOG_REDOPAGE
);
lrd
->
type
=
cpu_to_le16
(
LOG_REDOPAGE
);
// *pxd = mp->cm_pxd;
PXDaddress
(
pxd
,
mp
->
index
);
PXDaddress
(
pxd
,
mp
->
index
);
PXDlength
(
pxd
,
PXDlength
(
pxd
,
mp
->
logical_size
>>
tblk
->
sb
->
s_blocksize_bits
);
mp
->
logical_size
>>
tblk
->
sb
->
s_blocksize_bits
);
...
@@ -1552,7 +1527,6 @@ static int diLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
...
@@ -1552,7 +1527,6 @@ static int diLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
return
rc
;
return
rc
;
}
}
/*
/*
* dataLog()
* dataLog()
*
*
...
@@ -1599,7 +1573,6 @@ static int dataLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
...
@@ -1599,7 +1573,6 @@ static int dataLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
return
0
;
return
0
;
}
}
/*
/*
* dtLog()
* dtLog()
*
*
...
@@ -1639,7 +1612,6 @@ static void dtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
...
@@ -1639,7 +1612,6 @@ static void dtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
lrd
->
log
.
redopage
.
type
|=
cpu_to_le16
(
LOG_EXTEND
);
lrd
->
log
.
redopage
.
type
|=
cpu_to_le16
(
LOG_EXTEND
);
else
else
lrd
->
log
.
redopage
.
type
|=
cpu_to_le16
(
LOG_NEW
);
lrd
->
log
.
redopage
.
type
|=
cpu_to_le16
(
LOG_NEW
);
// *pxd = mp->cm_pxd;
PXDaddress
(
pxd
,
mp
->
index
);
PXDaddress
(
pxd
,
mp
->
index
);
PXDlength
(
pxd
,
PXDlength
(
pxd
,
mp
->
logical_size
>>
tblk
->
sb
->
s_blocksize_bits
);
mp
->
logical_size
>>
tblk
->
sb
->
s_blocksize_bits
);
...
@@ -1704,7 +1676,6 @@ static void dtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
...
@@ -1704,7 +1676,6 @@ static void dtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
return
;
return
;
}
}
/*
/*
* xtLog()
* xtLog()
*
*
...
@@ -1760,7 +1731,6 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
...
@@ -1760,7 +1731,6 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
* applying the after-image to the meta-data page.
* applying the after-image to the meta-data page.
*/
*/
lrd
->
type
=
cpu_to_le16
(
LOG_REDOPAGE
);
lrd
->
type
=
cpu_to_le16
(
LOG_REDOPAGE
);
// *page_pxd = mp->cm_pxd;
PXDaddress
(
page_pxd
,
mp
->
index
);
PXDaddress
(
page_pxd
,
mp
->
index
);
PXDlength
(
page_pxd
,
PXDlength
(
page_pxd
,
mp
->
logical_size
>>
tblk
->
sb
->
s_blocksize_bits
);
mp
->
logical_size
>>
tblk
->
sb
->
s_blocksize_bits
);
...
@@ -2093,7 +2063,6 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
...
@@ -2093,7 +2063,6 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
return
;
return
;
}
}
/*
/*
* mapLog()
* mapLog()
*
*
...
@@ -2180,7 +2149,6 @@ void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
...
@@ -2180,7 +2149,6 @@ void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
}
}
}
}
/*
/*
* txEA()
* txEA()
*
*
...
@@ -2233,7 +2201,6 @@ void txEA(tid_t tid, struct inode *ip, dxd_t * oldea, dxd_t * newea)
...
@@ -2233,7 +2201,6 @@ void txEA(tid_t tid, struct inode *ip, dxd_t * oldea, dxd_t * newea)
}
}
}
}
/*
/*
* txForce()
* txForce()
*
*
...
@@ -2300,7 +2267,6 @@ void txForce(struct tblock * tblk)
...
@@ -2300,7 +2267,6 @@ void txForce(struct tblock * tblk)
}
}
}
}
/*
/*
* txUpdateMap()
* txUpdateMap()
*
*
...
@@ -2437,7 +2403,6 @@ static void txUpdateMap(struct tblock * tblk)
...
@@ -2437,7 +2403,6 @@ static void txUpdateMap(struct tblock * tblk)
}
}
}
}
/*
/*
* txAllocPMap()
* txAllocPMap()
*
*
...
@@ -2509,7 +2474,6 @@ static void txAllocPMap(struct inode *ip, struct maplock * maplock,
...
@@ -2509,7 +2474,6 @@ static void txAllocPMap(struct inode *ip, struct maplock * maplock,
}
}
}
}
/*
/*
* txFreeMap()
* txFreeMap()
*
*
...
@@ -2611,7 +2575,6 @@ void txFreeMap(struct inode *ip,
...
@@ -2611,7 +2575,6 @@ void txFreeMap(struct inode *ip,
}
}
}
}
/*
/*
* txFreelock()
* txFreelock()
*
*
...
@@ -2652,7 +2615,6 @@ void txFreelock(struct inode *ip)
...
@@ -2652,7 +2615,6 @@ void txFreelock(struct inode *ip)
TXN_UNLOCK
();
TXN_UNLOCK
();
}
}
/*
/*
* txAbort()
* txAbort()
*
*
...
...
fs/jfs/jfs_txnmgr.h
View file @
1868f4aa
...
@@ -285,34 +285,26 @@ struct commit {
...
@@ -285,34 +285,26 @@ struct commit {
/*
/*
* external declarations
* external declarations
*/
*/
extern
struct
tlock
*
txLock
(
tid_t
tid
,
struct
inode
*
ip
,
struct
metapage
*
mp
,
extern
int
jfs_tlocks_low
;
int
flag
);
extern
int
txInit
(
void
);
extern
struct
tlock
*
txMaplock
(
tid_t
tid
,
struct
inode
*
ip
,
int
flag
);
extern
void
txExit
(
void
);
extern
struct
tlock
*
txLock
(
tid_t
,
struct
inode
*
,
struct
metapage
*
,
int
);
extern
int
txCommit
(
tid_t
tid
,
int
nip
,
struct
inode
**
iplist
,
int
flag
);
extern
struct
tlock
*
txMaplock
(
tid_t
,
struct
inode
*
,
int
);
extern
int
txCommit
(
tid_t
,
int
,
struct
inode
**
,
int
);
extern
tid_t
txBegin
(
struct
super_block
*
sb
,
int
flag
);
extern
tid_t
txBegin
(
struct
super_block
*
,
int
);
extern
void
txBeginAnon
(
struct
super_block
*
);
extern
void
txBeginAnon
(
struct
super_block
*
sb
);
extern
void
txEnd
(
tid_t
);
extern
void
txAbort
(
tid_t
,
int
);
extern
void
txEnd
(
tid_t
tid
);
extern
struct
linelock
*
txLinelock
(
struct
linelock
*
);
extern
void
txFreeMap
(
struct
inode
*
,
struct
maplock
*
,
struct
tblock
*
,
int
);
extern
void
txAbort
(
tid_t
tid
,
int
dirty
);
extern
void
txEA
(
tid_t
,
struct
inode
*
,
dxd_t
*
,
dxd_t
*
);
extern
void
txFreelock
(
struct
inode
*
);
extern
struct
linelock
*
txLinelock
(
struct
linelock
*
tlock
);
extern
int
lmLog
(
struct
jfs_log
*
,
struct
tblock
*
,
struct
lrd
*
,
struct
tlock
*
);
extern
void
txFreeMap
(
struct
inode
*
ip
,
struct
maplock
*
maplock
,
extern
void
txQuiesce
(
struct
super_block
*
);
struct
tblock
*
tblk
,
int
maptype
);
extern
void
txResume
(
struct
super_block
*
);
extern
void
txLazyUnlock
(
struct
tblock
*
);
extern
void
txEA
(
tid_t
tid
,
struct
inode
*
ip
,
dxd_t
*
oldea
,
dxd_t
*
newea
);
extern
int
jfs_lazycommit
(
void
*
);
extern
int
jfs_sync
(
void
*
);
extern
void
txFreelock
(
struct
inode
*
ip
);
extern
int
lmLog
(
struct
jfs_log
*
log
,
struct
tblock
*
tblk
,
struct
lrd
*
lrd
,
struct
tlock
*
tlck
);
extern
void
txQuiesce
(
struct
super_block
*
sb
);
extern
void
txResume
(
struct
super_block
*
sb
);
#endif
/* _H_JFS_TXNMGR */
#endif
/* _H_JFS_TXNMGR */
fs/jfs/namei.c
View file @
1868f4aa
...
@@ -31,20 +31,9 @@
...
@@ -31,20 +31,9 @@
#include "jfs_acl.h"
#include "jfs_acl.h"
#include "jfs_debug.h"
#include "jfs_debug.h"
extern
struct
inode_operations
jfs_file_inode_operations
;
extern
struct
inode_operations
jfs_symlink_inode_operations
;
extern
struct
file_operations
jfs_file_operations
;
extern
struct
address_space_operations
jfs_aops
;
extern
int
jfs_fsync
(
struct
file
*
,
struct
dentry
*
,
int
);
extern
void
jfs_truncate_nolock
(
struct
inode
*
,
loff_t
);
extern
int
jfs_init_acl
(
struct
inode
*
,
struct
inode
*
);
/*
/*
* forward references
* forward references
*/
*/
struct
inode_operations
jfs_dir_inode_operations
;
struct
file_operations
jfs_dir_operations
;
struct
dentry_operations
jfs_ci_dentry_operations
;
struct
dentry_operations
jfs_ci_dentry_operations
;
static
s64
commitZeroLink
(
tid_t
,
struct
inode
*
);
static
s64
commitZeroLink
(
tid_t
,
struct
inode
*
);
...
@@ -655,7 +644,7 @@ static s64 commitZeroLink(tid_t tid, struct inode *ip)
...
@@ -655,7 +644,7 @@ static s64 commitZeroLink(tid_t tid, struct inode *ip)
/*
/*
* NAME:
freeZeroL
ink()
* NAME:
jfs_free_zero_l
ink()
*
*
* FUNCTION: for non-directory, called by iClose(),
* FUNCTION: for non-directory, called by iClose(),
* free resources of a file from cache and WORKING map
* free resources of a file from cache and WORKING map
...
@@ -663,15 +652,12 @@ static s64 commitZeroLink(tid_t tid, struct inode *ip)
...
@@ -663,15 +652,12 @@ static s64 commitZeroLink(tid_t tid, struct inode *ip)
* while associated with a pager object,
* while associated with a pager object,
*
*
* PARAMETER: ip - pointer to inode of file.
* PARAMETER: ip - pointer to inode of file.
*
* RETURN: 0 -ok
*/
*/
int
freeZeroL
ink
(
struct
inode
*
ip
)
void
jfs_free_zero_l
ink
(
struct
inode
*
ip
)
{
{
int
rc
=
0
;
int
type
;
int
type
;
jfs_info
(
"
freeZeroL
ink: ip = 0x%p"
,
ip
);
jfs_info
(
"
jfs_free_zero_l
ink: ip = 0x%p"
,
ip
);
/* return if not reg or symbolic link or if size is
/* return if not reg or symbolic link or if size is
* already ok.
* already ok.
...
@@ -684,10 +670,10 @@ int freeZeroLink(struct inode *ip)
...
@@ -684,10 +670,10 @@ int freeZeroLink(struct inode *ip)
case
S_IFLNK
:
case
S_IFLNK
:
/* if its contained in inode nothing to do */
/* if its contained in inode nothing to do */
if
(
ip
->
i_size
<
IDATASIZE
)
if
(
ip
->
i_size
<
IDATASIZE
)
return
0
;
return
;
break
;
break
;
default:
default:
return
0
;
return
;
}
}
/*
/*
...
@@ -737,9 +723,7 @@ int freeZeroLink(struct inode *ip)
...
@@ -737,9 +723,7 @@ int freeZeroLink(struct inode *ip)
* free xtree/data blocks from working block map;
* free xtree/data blocks from working block map;
*/
*/
if
(
ip
->
i_size
)
if
(
ip
->
i_size
)
rc
=
xtTruncate
(
0
,
ip
,
0
,
COMMIT_WMAP
);
xtTruncate
(
0
,
ip
,
0
,
COMMIT_WMAP
);
return
rc
;
}
}
/*
/*
...
...
fs/jfs/super.c
View file @
1868f4aa
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include "jfs_incore.h"
#include "jfs_incore.h"
#include "jfs_filsys.h"
#include "jfs_filsys.h"
#include "jfs_inode.h"
#include "jfs_metapage.h"
#include "jfs_metapage.h"
#include "jfs_superblock.h"
#include "jfs_superblock.h"
#include "jfs_dmap.h"
#include "jfs_dmap.h"
...
@@ -62,37 +63,6 @@ module_param(jfsloglevel, int, 0644);
...
@@ -62,37 +63,6 @@ module_param(jfsloglevel, int, 0644);
MODULE_PARM_DESC
(
jfsloglevel
,
"Specify JFS loglevel (0, 1 or 2)"
);
MODULE_PARM_DESC
(
jfsloglevel
,
"Specify JFS loglevel (0, 1 or 2)"
);
#endif
#endif
/*
* External declarations
*/
extern
int
jfs_mount
(
struct
super_block
*
);
extern
int
jfs_mount_rw
(
struct
super_block
*
,
int
);
extern
int
jfs_umount
(
struct
super_block
*
);
extern
int
jfs_umount_rw
(
struct
super_block
*
);
extern
int
jfsIOWait
(
void
*
);
extern
int
jfs_lazycommit
(
void
*
);
extern
int
jfs_sync
(
void
*
);
extern
void
jfs_read_inode
(
struct
inode
*
inode
);
extern
void
jfs_dirty_inode
(
struct
inode
*
inode
);
extern
void
jfs_delete_inode
(
struct
inode
*
inode
);
extern
int
jfs_write_inode
(
struct
inode
*
inode
,
int
wait
);
extern
struct
dentry
*
jfs_get_parent
(
struct
dentry
*
dentry
);
extern
int
jfs_extendfs
(
struct
super_block
*
,
s64
,
int
);
extern
struct
dentry_operations
jfs_ci_dentry_operations
;
#ifdef PROC_FS_JFS
/* see jfs_debug.h */
extern
void
jfs_proc_init
(
void
);
extern
void
jfs_proc_clean
(
void
);
#endif
extern
wait_queue_head_t
jfs_IO_thread_wait
;
extern
wait_queue_head_t
jfs_commit_thread_wait
;
extern
wait_queue_head_t
jfs_sync_thread_wait
;
static
void
jfs_handle_error
(
struct
super_block
*
sb
)
static
void
jfs_handle_error
(
struct
super_block
*
sb
)
{
{
struct
jfs_sb_info
*
sbi
=
JFS_SBI
(
sb
);
struct
jfs_sb_info
*
sbi
=
JFS_SBI
(
sb
);
...
@@ -593,11 +563,6 @@ static struct file_system_type jfs_fs_type = {
...
@@ -593,11 +563,6 @@ static struct file_system_type jfs_fs_type = {
.
fs_flags
=
FS_REQUIRES_DEV
,
.
fs_flags
=
FS_REQUIRES_DEV
,
};
};
extern
int
metapage_init
(
void
);
extern
int
txInit
(
void
);
extern
void
txExit
(
void
);
extern
void
metapage_exit
(
void
);
static
void
init_once
(
void
*
foo
,
kmem_cache_t
*
cachep
,
unsigned
long
flags
)
static
void
init_once
(
void
*
foo
,
kmem_cache_t
*
cachep
,
unsigned
long
flags
)
{
{
struct
jfs_inode_info
*
jfs_ip
=
(
struct
jfs_inode_info
*
)
foo
;
struct
jfs_inode_info
*
jfs_ip
=
(
struct
jfs_inode_info
*
)
foo
;
...
...
fs/jfs/symlink.c
View file @
1868f4aa
/*
/*
* Copyright (
c
) Christoph Hellwig, 2001-2002
* Copyright (
C
) Christoph Hellwig, 2001-2002
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#include <linux/fs.h>
#include <linux/fs.h>
#include <linux/namei.h>
#include <linux/namei.h>
#include "jfs_incore.h"
#include "jfs_incore.h"
#include "jfs_inode.h"
#include "jfs_xattr.h"
#include "jfs_xattr.h"
static
int
jfs_follow_link
(
struct
dentry
*
dentry
,
struct
nameidata
*
nd
)
static
int
jfs_follow_link
(
struct
dentry
*
dentry
,
struct
nameidata
*
nd
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment