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
nexedi
linux
Commits
e30b4514
Commit
e30b4514
authored
Sep 06, 2002
by
Paul Mackerras
Browse files
Options
Browse Files
Download
Plain Diff
Merge samba.org:/home/paulus/kernel/linux-2.5
into samba.org:/home/paulus/kernel/for-linus-ppc
parents
91df4d52
1114b497
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
131 additions
and
273 deletions
+131
-273
Makefile
Makefile
+1
-1
drivers/ide/ide.c
drivers/ide/ide.c
+4
-20
fs/aio.c
fs/aio.c
+1
-1
fs/jfs/file.c
fs/jfs/file.c
+0
-11
fs/jfs/inode.c
fs/jfs/inode.c
+1
-2
fs/jfs/jfs_dtree.c
fs/jfs/jfs_dtree.c
+0
-1
fs/jfs/jfs_extendfs.h
fs/jfs/jfs_extendfs.h
+0
-36
fs/jfs/jfs_extent.c
fs/jfs/jfs_extent.c
+8
-1
fs/jfs/jfs_imap.c
fs/jfs/jfs_imap.c
+17
-11
fs/jfs/jfs_incore.h
fs/jfs/jfs_incore.h
+0
-2
fs/jfs/jfs_logmgr.c
fs/jfs/jfs_logmgr.c
+6
-4
fs/jfs/jfs_metapage.c
fs/jfs/jfs_metapage.c
+7
-65
fs/jfs/jfs_metapage.h
fs/jfs/jfs_metapage.h
+0
-5
fs/jfs/jfs_mount.c
fs/jfs/jfs_mount.c
+24
-19
fs/jfs/jfs_superblock.h
fs/jfs/jfs_superblock.h
+1
-1
fs/jfs/jfs_txnmgr.c
fs/jfs/jfs_txnmgr.c
+0
-1
fs/jfs/jfs_umount.c
fs/jfs/jfs_umount.c
+15
-6
fs/jfs/namei.c
fs/jfs/namei.c
+1
-2
fs/jfs/resize.c
fs/jfs/resize.c
+22
-14
fs/jfs/super.c
fs/jfs/super.c
+3
-44
fs/jfs/xattr.c
fs/jfs/xattr.c
+20
-24
include/linux/ide.h
include/linux/ide.h
+0
-2
No files found.
Makefile
View file @
e30b4514
...
...
@@ -318,7 +318,7 @@ prepare: include/linux/version.h include/asm include/config/MARKER
# This can be used by arch/$ARCH/Makefile to preprocess
# their vmlinux.lds.S file
arch/$
ARCH/vmlinux.lds.s
:
arch/$ARCH
/vmlinux.lds.S
arch/$
(ARCH)/vmlinux.lds.s
:
arch/$(ARCH)
/vmlinux.lds.S
$(CPP)
$(CPPFLAGS)
$
(
CPPFLAGS_
$@
)
-P
-C
-U
$(ARCH)
$<
-o
$@
# Single targets
...
...
drivers/ide/ide.c
View file @
e30b4514
...
...
@@ -275,7 +275,6 @@ static void init_hwif_data (unsigned int index)
drive
->
name
[
1
]
=
'd'
;
drive
->
name
[
2
]
=
'a'
+
(
index
*
MAX_DRIVES
)
+
unit
;
drive
->
max_failures
=
IDE_DEFAULT_MAX_FAILURES
;
init_waitqueue_head
(
&
drive
->
wqueue
);
INIT_LIST_HEAD
(
&
drive
->
list
);
}
}
...
...
@@ -1805,8 +1804,6 @@ static int ide_open (struct inode * inode, struct file * filp)
#endif
/* defined(CONFIG_BLK_DEV_IDESCSI) && defined(CONFIG_SCSI) */
}
#endif
/* CONFIG_KMOD */
while
(
drive
->
busy
)
sleep_on
(
&
drive
->
wqueue
);
drive
->
usage
++
;
if
(
drive
->
driver
!=
NULL
)
return
DRIVER
(
drive
)
->
open
(
inode
,
filp
,
drive
);
...
...
@@ -1877,7 +1874,7 @@ struct seq_operations ide_drivers_op = {
*/
int
ide_replace_subdriver
(
ide_drive_t
*
drive
,
const
char
*
driver
)
{
if
(
!
drive
->
present
||
drive
->
busy
||
drive
->
usage
)
if
(
!
drive
->
present
||
drive
->
usage
)
goto
abort
;
if
(
drive
->
driver
!=
NULL
&&
DRIVER
(
drive
)
->
cleanup
(
drive
))
goto
abort
;
...
...
@@ -1961,7 +1958,7 @@ void ide_unregister (unsigned int index)
drive
=
&
hwif
->
drives
[
unit
];
if
(
!
drive
->
present
)
continue
;
if
(
drive
->
busy
||
drive
->
usage
)
if
(
drive
->
usage
)
goto
abort
;
if
(
drive
->
driver
!=
NULL
&&
DRIVER
(
drive
)
->
cleanup
(
drive
))
goto
abort
;
...
...
@@ -2653,18 +2650,6 @@ static int ide_ioctl (struct inode *inode, struct file *file,
}
return
0
;
}
case
BLKGETSIZE
:
case
BLKGETSIZE64
:
case
BLKROSET
:
case
BLKROGET
:
case
BLKFLSBUF
:
case
BLKSSZGET
:
case
BLKPG
:
case
BLKELVGET
:
case
BLKELVSET
:
case
BLKBSZGET
:
case
BLKBSZSET
:
return
blk_ioctl
(
inode
->
i_bdev
,
cmd
,
arg
);
case
CDROMEJECT
:
case
CDROMCLOSETRAY
:
...
...
@@ -3434,7 +3419,7 @@ int ide_register_subdriver (ide_drive_t *drive, ide_driver_t *driver, int versio
spin_lock_irqsave
(
&
ide_lock
,
flags
);
if
(
version
!=
IDE_SUBDRIVER_VERSION
||
!
drive
->
present
||
drive
->
driver
!=
NULL
||
drive
->
busy
||
drive
->
usage
)
{
drive
->
driver
!=
NULL
||
drive
->
usage
)
{
spin_unlock_irqrestore
(
&
ide_lock
,
flags
);
return
1
;
}
...
...
@@ -3463,8 +3448,7 @@ int ide_unregister_subdriver (ide_drive_t *drive)
unsigned
long
flags
;
spin_lock_irqsave
(
&
ide_lock
,
flags
);
if
(
drive
->
usage
||
drive
->
busy
||
drive
->
driver
==
NULL
||
DRIVER
(
drive
)
->
busy
)
{
if
(
drive
->
usage
||
drive
->
driver
==
NULL
||
DRIVER
(
drive
)
->
busy
)
{
spin_unlock_irqrestore
(
&
ide_lock
,
flags
);
return
1
;
}
...
...
fs/aio.c
View file @
e30b4514
...
...
@@ -992,7 +992,7 @@ asmlinkage long sys_io_submit(aio_context_t ctx_id, long nr,
break
;
}
if
(
unlikely
(
__
copy_from_user
(
&
tmp
,
user_iocb
,
sizeof
(
tmp
))))
{
if
(
unlikely
(
copy_from_user
(
&
tmp
,
user_iocb
,
sizeof
(
tmp
))))
{
ret
=
-
EFAULT
;
break
;
}
...
...
fs/jfs/file.c
View file @
e30b4514
...
...
@@ -24,9 +24,6 @@
#include "jfs_debug.h"
extern
int
generic_file_open
(
struct
inode
*
,
struct
file
*
);
extern
loff_t
generic_file_llseek
(
struct
file
*
,
loff_t
,
int
origin
);
extern
int
jfs_commit_inode
(
struct
inode
*
,
int
);
int
jfs_fsync
(
struct
file
*
file
,
struct
dentry
*
dentry
,
int
datasync
)
...
...
@@ -114,11 +111,3 @@ struct file_operations jfs_file_operations = {
.
sendfile
=
generic_file_sendfile
,
.
fsync
=
jfs_fsync
,
};
struct
inode_operations
jfs_special_inode_operations
=
{
.
setxattr
=
jfs_setxattr
,
.
getxattr
=
jfs_getxattr
,
.
listxattr
=
jfs_listxattr
,
.
removexattr
=
jfs_removexattr
,
};
fs/jfs/inode.c
View file @
e30b4514
...
...
@@ -31,7 +31,6 @@
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
inode_operations
jfs_special_inode_operations
;
extern
struct
file_operations
jfs_dir_operations
;
extern
struct
file_operations
jfs_file_operations
;
struct
address_space_operations
jfs_aops
;
...
...
@@ -66,7 +65,7 @@ struct inode *jfs_iget(struct super_block *sb, ino_t ino)
}
else
inode
->
i_op
=
&
jfs_symlink_inode_operations
;
}
else
{
inode
->
i_op
=
&
jfs_
special
_inode_operations
;
inode
->
i_op
=
&
jfs_
file
_inode_operations
;
init_special_inode
(
inode
,
inode
->
i_mode
,
kdev_t_to_nr
(
inode
->
i_rdev
));
}
...
...
fs/jfs/jfs_dtree.c
View file @
e30b4514
...
...
@@ -101,7 +101,6 @@
*/
#include <linux/fs.h>
#include <linux/smp_lock.h>
#include "jfs_incore.h"
#include "jfs_superblock.h"
#include "jfs_filsys.h"
...
...
fs/jfs/jfs_extendfs.h
deleted
100644 → 0
View file @
91df4d52
/*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _H_JFS_EXTENDFS
#define _H_JFS_EXTENDFS
/*
* extendfs parameter list
*/
typedef
struct
{
u32
flag
;
/* 4: */
u8
dev
;
/* 1: */
u8
pad
[
3
];
/* 3: */
s64
LVSize
;
/* 8: LV size in LV block */
s64
FSSize
;
/* 8: FS size in LV block */
s32
LogSize
;
/* 4: inlinelog size in LV block */
}
extendfs_t
;
/* (28) */
/* plist flag */
#define EXTENDFS_QUERY 0x00000001
#endif
/* _H_JFS_EXTENDFS */
fs/jfs/jfs_extent.c
View file @
e30b4514
...
...
@@ -26,8 +26,9 @@
* forward references
*/
static
int
extBalloc
(
struct
inode
*
,
s64
,
s64
*
,
s64
*
);
#ifdef _NOTYET
static
int
extBrealloc
(
struct
inode
*
,
s64
,
s64
,
s64
*
,
s64
*
);
int
extRecord
(
struct
inode
*
,
xad_t
*
);
#endif
static
s64
extRoundDown
(
s64
nb
);
/*
...
...
@@ -191,6 +192,7 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, boolean_t abnr)
}
#ifdef _NOTYET
/*
* NAME: extRealloc()
*
...
...
@@ -335,6 +337,7 @@ int extRealloc(struct inode *ip, s64 nxlen, xad_t * xp, boolean_t abnr)
up
(
&
JFS_IP
(
ip
)
->
commit_sem
);
return
(
rc
);
}
#endif
/* _NOTYET */
/*
...
...
@@ -440,6 +443,7 @@ int extRecord(struct inode *ip, xad_t * xp)
}
#ifdef _NOTYET
/*
* NAME: extFill()
*
...
...
@@ -473,6 +477,7 @@ int extFill(struct inode *ip, xad_t * xp)
return
(
0
);
}
#endif
/* _NOTYET */
/*
...
...
@@ -548,6 +553,7 @@ extBalloc(struct inode *ip, s64 hint, s64 * nblocks, s64 * blkno)
}
#ifdef _NOTYET
/*
* NAME: extBrealloc()
*
...
...
@@ -601,6 +607,7 @@ extBrealloc(struct inode *ip,
*/
return
(
extBalloc
(
ip
,
blkno
,
newnblks
,
newblkno
));
}
#endif
/* _NOTYET */
/*
...
...
fs/jfs/jfs_imap.c
View file @
e30b4514
...
...
@@ -42,6 +42,8 @@
*/
#include <linux/fs.h>
#include <linux/buffer_head.h>
#include "jfs_incore.h"
#include "jfs_filsys.h"
#include "jfs_dinode.h"
...
...
@@ -1175,7 +1177,7 @@ int diFree(struct inode *ip)
* invalidate any page of the inode extent freed from buffer cache;
*/
freepxd
=
iagp
->
inoext
[
extno
];
invalidate_pxd_metapages
(
JFS_SBI
(
ip
->
i_sb
)
->
direct
_inode
,
freepxd
);
invalidate_pxd_metapages
(
ip
->
i_sb
->
s_bdev
->
bd
_inode
,
freepxd
);
/*
* update iag list(s) (careful update step 2)
...
...
@@ -2963,26 +2965,30 @@ printf("diExtendFS: iag:%d agstart:%Ld agno:%d\n", i, agstart, n);
*
* note: shadow page with regular inode (rel.2);
*/
static
void
duplicateIXtree
(
struct
super_block
*
sb
,
s64
blkno
,
int
xlen
,
s64
*
xaddr
)
static
void
duplicateIXtree
(
struct
super_block
*
sb
,
s64
blkno
,
int
xlen
,
s64
*
xaddr
)
{
int
rc
;
tid_t
tid
;
struct
inode
*
ip
;
metapage_t
*
mpsuper
;
struct
jfs_superblock
*
j_sb
;
struct
buffer_head
*
bh
;
struct
inode
*
ip
;
tid_t
tid
;
int
rc
;
/* if AIT2 ipmap2 is bad, do not try to update it */
if
(
JFS_SBI
(
sb
)
->
mntflag
&
JFS_BAD_SAIT
)
/* s_flag */
return
;
ip
=
diReadSpecial
(
sb
,
FILESYSTEM_I
,
1
);
if
(
ip
==
0
)
{
if
(
ip
==
NULL
)
{
JFS_SBI
(
sb
)
->
mntflag
|=
JFS_BAD_SAIT
;
if
((
rc
=
readSuper
(
sb
,
&
mpsuper
)))
if
((
rc
=
readSuper
(
sb
,
&
bh
)))
return
;
j_sb
=
(
struct
jfs_superblock
*
)
(
mpsuper
->
data
)
;
j_sb
=
(
struct
jfs_superblock
*
)
bh
->
b_data
;
j_sb
->
s_flag
|=
JFS_BAD_SAIT
;
write_metapage
(
mpsuper
);
mark_buffer_dirty
(
bh
);
ll_rw_block
(
WRITE
,
1
,
&
bh
);
wait_on_buffer
(
bh
);
brelse
(
bh
);
return
;
}
...
...
fs/jfs/jfs_incore.h
View file @
e30b4514
...
...
@@ -152,8 +152,6 @@ struct jfs_sb_info {
/* Formerly in ipbmap */
struct
bmap
*
bmap
;
/* 4: incore bmap descriptor */
struct
nls_table
*
nls_tab
;
/* 4: current codepage */
struct
inode
*
direct_inode
;
/* 4: inode for physical I/O */
struct
address_space
*
direct_mapping
;
/* 4: mapping for physical I/O */
uint
state
;
/* 4: mount/recovery state */
};
...
...
fs/jfs/jfs_logmgr.c
View file @
e30b4514
...
...
@@ -960,17 +960,19 @@ int lmLogSync(log_t * log, int nosyncwait)
* reset syncpt = sync
*/
if
(
log
->
sync
!=
log
->
syncpt
)
{
struct
jfs_sb_info
*
sbi
=
JFS_SBI
(
log
->
sb
);
struct
super_block
*
sb
=
log
->
sb
;
struct
jfs_sb_info
*
sbi
=
JFS_SBI
(
sb
);
/*
* We need to make sure all of the "written" metapages
* actually make it to disk
*/
filemap_fdatawrite
(
sbi
->
ipbmap
->
i_mapping
);
filemap_fdatawrite
(
sbi
->
ipimap
->
i_mapping
);
filemap_fdatawrite
(
sb
i
->
direct
_inode
->
i_mapping
);
filemap_fdatawrite
(
sb
->
s_bdev
->
bd
_inode
->
i_mapping
);
filemap_fdatawait
(
sbi
->
ipbmap
->
i_mapping
);
filemap_fdatawait
(
sbi
->
ipimap
->
i_mapping
);
filemap_fdatawait
(
sb
i
->
direct
_inode
->
i_mapping
);
filemap_fdatawait
(
sb
->
s_bdev
->
bd
_inode
->
i_mapping
);
lrd
.
logtid
=
0
;
lrd
.
backchain
=
0
;
...
...
@@ -1985,6 +1987,7 @@ static void lbmIODone(struct bio *bio)
jERROR
(
1
,
(
"lbmIODone: I/O error in JFS log
\n
"
));
}
bio_put
(
bio
);
/*
...
...
@@ -2102,7 +2105,6 @@ static void lbmIODone(struct bio *bio)
LCACHE_UNLOCK
(
flags
);
/* unlock+enable */
}
return
;
}
int
jfsIOWait
(
void
*
arg
)
...
...
fs/jfs/jfs_metapage.c
View file @
e30b4514
...
...
@@ -27,16 +27,13 @@
#include "jfs_txnmgr.h"
#include "jfs_debug.h"
extern
struct
task_struct
*
jfsCommitTask
;
static
spinlock_t
meta_lock
=
SPIN_LOCK_UNLOCKED
;
static
wait_queue_head_t
meta_wait
;
#ifdef CONFIG_JFS_STATISTICS
struct
{
uint
pagealloc
;
/* # of page allocations */
uint
pagefree
;
/* # of page frees */
uint
lockwait
;
/* # of sleeping lock_metapage() calls */
uint
allocwait
;
/* # of sleeping alloc_metapage() calls */
}
mpStat
;
#endif
...
...
@@ -134,11 +131,6 @@ static void mp_mempool_free(void *element, void *pool_data)
int
__init
metapage_init
(
void
)
{
/*
* Initialize wait queue
*/
init_waitqueue_head
(
&
meta_wait
);
/*
* Allocate the metapage structures
*/
...
...
@@ -225,51 +217,6 @@ static void remove_from_hash(metapage_t * mp, metapage_t ** hash_ptr)
mp
->
hash_next
->
hash_prev
=
mp
->
hash_prev
;
}
/*
* Direct address space operations
*/
static
int
direct_get_block
(
struct
inode
*
ip
,
sector_t
lblock
,
struct
buffer_head
*
bh_result
,
int
create
)
{
if
(
create
)
set_buffer_new
(
bh_result
);
map_bh
(
bh_result
,
ip
->
i_sb
,
lblock
);
return
0
;
}
static
int
direct_writepage
(
struct
page
*
page
)
{
return
block_write_full_page
(
page
,
direct_get_block
);
}
static
int
direct_readpage
(
struct
file
*
fp
,
struct
page
*
page
)
{
return
block_read_full_page
(
page
,
direct_get_block
);
}
static
int
direct_prepare_write
(
struct
file
*
file
,
struct
page
*
page
,
unsigned
from
,
unsigned
to
)
{
return
block_prepare_write
(
page
,
from
,
to
,
direct_get_block
);
}
static
int
direct_bmap
(
struct
address_space
*
mapping
,
long
block
)
{
return
generic_block_bmap
(
mapping
,
block
,
direct_get_block
);
}
struct
address_space_operations
direct_aops
=
{
.
readpage
=
direct_readpage
,
.
writepage
=
direct_writepage
,
.
sync_page
=
block_sync_page
,
.
prepare_write
=
direct_prepare_write
,
.
commit_write
=
generic_commit_write
,
.
bmap
=
direct_bmap
,
};
metapage_t
*
__get_metapage
(
struct
inode
*
inode
,
unsigned
long
lblock
,
unsigned
int
size
,
int
absolute
,
unsigned
long
new
)
...
...
@@ -286,14 +233,12 @@ metapage_t *__get_metapage(struct inode *inode,
inode
,
lblock
));
if
(
absolute
)
mapping
=
JFS_SBI
(
inode
->
i_sb
)
->
direct
_mapping
;
mapping
=
inode
->
i_sb
->
s_bdev
->
bd_inode
->
i
_mapping
;
else
mapping
=
inode
->
i_mapping
;
spin_lock
(
&
meta_lock
);
hash_ptr
=
meta_hash
(
mapping
,
lblock
);
mp
=
search_hash
(
hash_ptr
,
mapping
,
lblock
);
if
(
mp
)
{
page_found:
...
...
@@ -309,7 +254,7 @@ metapage_t *__get_metapage(struct inode *inode,
lock_metapage
(
mp
);
spin_unlock
(
&
meta_lock
);
}
else
{
l2bsize
=
inode
->
i_
sb
->
s_blocksize_
bits
;
l2bsize
=
inode
->
i_
blk
bits
;
l2BlocksPerPage
=
PAGE_CACHE_SHIFT
-
l2bsize
;
page_index
=
lblock
>>
l2BlocksPerPage
;
page_offset
=
(
lblock
-
(
page_index
<<
l2BlocksPerPage
))
<<
...
...
@@ -431,12 +376,11 @@ void hold_metapage(metapage_t * mp, int force)
static
void
__write_metapage
(
metapage_t
*
mp
)
{
struct
inode
*
ip
=
(
struct
inode
*
)
mp
->
mapping
->
host
;
int
l2bsize
=
mp
->
mapping
->
host
->
i_blkbits
;
int
l2BlocksPerPage
=
PAGE_CACHE_SHIFT
-
l2bsize
;
unsigned
long
page_index
;
unsigned
long
page_offset
;
int
rc
;
int
l2bsize
=
ip
->
i_sb
->
s_blocksize_bits
;
int
l2BlocksPerPage
=
PAGE_CACHE_SHIFT
-
l2bsize
;
jFYI
(
1
,
(
"__write_metapage: mp = 0x%p
\n
"
,
mp
));
...
...
@@ -561,7 +505,7 @@ void __invalidate_metapages(struct inode *ip, s64 addr, int len)
{
metapage_t
**
hash_ptr
;
unsigned
long
lblock
;
int
l2BlocksPerPage
=
PAGE_CACHE_SHIFT
-
ip
->
i_
sb
->
s_blocksize_
bits
;
int
l2BlocksPerPage
=
PAGE_CACHE_SHIFT
-
ip
->
i_
blk
bits
;
struct
address_space
*
mapping
=
ip
->
i_mapping
;
metapage_t
*
mp
;
struct
page
*
page
;
...
...
@@ -624,12 +568,10 @@ int jfs_mpstat_read(char *buffer, char **start, off_t offset, int length,
"=======================
\n
"
"page allocations = %d
\n
"
"page frees = %d
\n
"
"lock waits = %d
\n
"
"allocation waits = %d
\n
"
,
"lock waits = %d
\n
"
,
mpStat
.
pagealloc
,
mpStat
.
pagefree
,
mpStat
.
lockwait
,
mpStat
.
allocwait
);
mpStat
.
lockwait
);
begin
=
offset
;
*
start
=
buffer
+
begin
;
...
...
fs/jfs/jfs_metapage.h
View file @
e30b4514
...
...
@@ -57,11 +57,6 @@ typedef struct metapage {
struct
jfs_log
*
log
;
}
metapage_t
;
/*
* Direct-access address space operations
*/
extern
struct
address_space_operations
direct_aops
;
/* metapage flag */
#define META_locked 0
#define META_absolute 1
...
...
fs/jfs/jfs_mount.c
View file @
e30b4514
...
...
@@ -48,6 +48,8 @@
*/
#include <linux/fs.h>
#include <linux/buffer_head.h>
#include "jfs_incore.h"
#include "jfs_filsys.h"
#include "jfs_superblock.h"
...
...
@@ -314,18 +316,18 @@ int jfs_mount_rw(struct super_block *sb, int remount)
static
int
chkSuper
(
struct
super_block
*
sb
)
{
int
rc
=
0
;
metapage_t
*
mp
;
struct
jfs_sb_info
*
sbi
=
JFS_SBI
(
sb
);
struct
jfs_superblock
*
j_sb
;
struct
buffer_head
*
bh
;
int
AIM_bytesize
,
AIT_bytesize
;
int
expected_AIM_bytesize
,
expected_AIT_bytesize
;
s64
AIM_byte_addr
,
AIT_byte_addr
,
fsckwsp_addr
;
s64
byte_addr_diff0
,
byte_addr_diff1
;
s32
bsize
;
if
((
rc
=
readSuper
(
sb
,
&
mp
)))
if
((
rc
=
readSuper
(
sb
,
&
bh
)))
return
rc
;
j_sb
=
(
struct
jfs_superblock
*
)
(
mp
->
data
)
;
j_sb
=
(
struct
jfs_superblock
*
)
bh
->
b_data
;
/*
* validate superblock
...
...
@@ -414,8 +416,7 @@ static int chkSuper(struct super_block *sb)
sbi
->
ait2
=
j_sb
->
s_ait2
;
out:
release_metapage
(
mp
);
brelse
(
bh
);
return
rc
;
}
...
...
@@ -429,7 +430,7 @@ int updateSuper(struct super_block *sb, uint state)
{
struct
jfs_superblock
*
j_sb
;
struct
jfs_sb_info
*
sbi
=
JFS_SBI
(
sb
);
metapage_t
*
mp
;
struct
buffer_head
*
bh
;
int
rc
;
/*
...
...
@@ -438,10 +439,10 @@ int updateSuper(struct super_block *sb, uint state)
if
(
sbi
->
state
==
FM_DIRTY
)
return
0
;
if
((
rc
=
readSuper
(
sb
,
&
mp
)))
if
((
rc
=
readSuper
(
sb
,
&
bh
)))
return
rc
;
j_sb
=
(
struct
jfs_superblock
*
)
(
mp
->
data
)
;
j_sb
=
(
struct
jfs_superblock
*
)
bh
->
b_data
;
j_sb
->
s_state
=
cpu_to_le32
(
state
);
sbi
->
state
=
state
;
...
...
@@ -459,7 +460,10 @@ int updateSuper(struct super_block *sb, uint state)
j_sb
->
s_flag
|=
cpu_to_le32
(
JFS_DASD_PRIME
);
}
flush_metapage
(
mp
);
mark_buffer_dirty
(
bh
);
ll_rw_block
(
WRITE
,
1
,
&
bh
);
wait_on_buffer
(
bh
);
brelse
(
bh
);
return
0
;
}
...
...
@@ -470,18 +474,19 @@ int updateSuper(struct super_block *sb, uint state)
*
* read superblock by raw sector address
*/
int
readSuper
(
struct
super_block
*
sb
,
metapage_t
**
m
pp
)
int
readSuper
(
struct
super_block
*
sb
,
struct
buffer_head
**
b
pp
)
{
/* read in primary superblock */
*
mpp
=
read_metapage
(
JFS_SBI
(
sb
)
->
direct_inode
,
SUPER1_OFF
>>
sb
->
s_blocksize_bits
,
PSIZE
,
1
);
if
(
*
mpp
==
NULL
)
{
/* read in secondary/replicated superblock */
*
mpp
=
read_metapage
(
JFS_SBI
(
sb
)
->
direct_inode
,
SUPER2_OFF
>>
sb
->
s_blocksize_bits
,
PSIZE
,
1
);
}
return
*
mpp
?
0
:
1
;
*
bpp
=
sb_bread
(
sb
,
SUPER1_OFF
>>
sb
->
s_blocksize_bits
);
if
(
bpp
)
return
0
;
/* read in secondary/replicated superblock */
*
bpp
=
sb_bread
(
sb
,
SUPER2_OFF
>>
sb
->
s_blocksize_bits
);
if
(
bpp
)
return
0
;
return
-
EIO
;
}
...
...
fs/jfs/jfs_superblock.h
View file @
e30b4514
...
...
@@ -106,7 +106,7 @@ struct jfs_superblock {
};
extern
int
readSuper
(
struct
super_block
*
,
struct
metapage
**
);
extern
int
readSuper
(
struct
super_block
*
,
struct
buffer_head
**
);
extern
int
updateSuper
(
struct
super_block
*
,
uint
);
#endif
/*_H_JFS_SUPERBLOCK */
fs/jfs/jfs_txnmgr.c
View file @
e30b4514
...
...
@@ -144,7 +144,6 @@ struct {
*/
extern
int
lmGroupCommit
(
log_t
*
log
,
tblock_t
*
tblk
);
extern
void
lmSync
(
log_t
*
);
extern
int
readSuper
(
struct
super_block
*
sb
,
metapage_t
**
bpp
);
extern
int
jfs_commit_inode
(
struct
inode
*
,
int
);
extern
int
jfs_stop_threads
;
...
...
fs/jfs/jfs_umount.c
View file @
e30b4514
...
...
@@ -49,13 +49,14 @@
*/
int
jfs_umount
(
struct
super_block
*
sb
)
{
int
rc
=
0
;
log_t
*
log
;
struct
address_space
*
bdev_mapping
=
sb
->
s_bdev
->
bd_inode
->
i_mapping
;
struct
jfs_sb_info
*
sbi
=
JFS_SBI
(
sb
);
struct
inode
*
ipbmap
=
sbi
->
ipbmap
;
struct
inode
*
ipimap
=
sbi
->
ipimap
;
struct
inode
*
ipaimap
=
sbi
->
ipaimap
;
struct
inode
*
ipaimap2
=
sbi
->
ipaimap2
;
log_t
*
log
;
int
rc
=
0
;
jFYI
(
1
,
(
"
\n
UnMount JFS: sb:0x%p
\n
"
,
sb
));
...
...
@@ -112,8 +113,8 @@ int jfs_umount(struct super_block *sb)
* Make sure all metadata makes it to disk before we mark
* the superblock as clean
*/
filemap_fdatawrite
(
sbi
->
direct_inode
->
i
_mapping
);
filemap_fdatawait
(
sbi
->
direct_inode
->
i
_mapping
);
filemap_fdatawrite
(
bdev
_mapping
);
filemap_fdatawait
(
bdev
_mapping
);
/*
* ensure all file system file pages are propagated to their
...
...
@@ -140,6 +141,7 @@ int jfs_umount(struct super_block *sb)
int
jfs_umount_rw
(
struct
super_block
*
sb
)
{
struct
address_space
*
bdev_mapping
=
sb
->
s_bdev
->
bd_inode
->
i_mapping
;
struct
jfs_sb_info
*
sbi
=
JFS_SBI
(
sb
);
log_t
*
log
=
sbi
->
log
;
...
...
@@ -158,8 +160,15 @@ int jfs_umount_rw(struct super_block *sb)
*/
dbSync
(
sbi
->
ipbmap
);
diSync
(
sbi
->
ipimap
);
filemap_fdatawrite
(
sbi
->
direct_inode
->
i_mapping
);
filemap_fdatawait
(
sbi
->
direct_inode
->
i_mapping
);
/*
* Note that we have to do this even if sync_blockdev() will
* do exactly the same a few instructions later: We can't
* mark the superblock clean before everything is flushed to
* disk.
*/
filemap_fdatawrite
(
bdev_mapping
);
filemap_fdatawait
(
bdev_mapping
);
updateSuper
(
sb
,
FM_CLEAN
);
sbi
->
log
=
NULL
;
...
...
fs/jfs/namei.c
View file @
e30b4514
...
...
@@ -29,7 +29,6 @@
extern
struct
inode_operations
jfs_file_inode_operations
;
extern
struct
inode_operations
jfs_symlink_inode_operations
;
extern
struct
inode_operations
jfs_special_inode_operations
;
extern
struct
file_operations
jfs_file_operations
;
extern
struct
address_space_operations
jfs_aops
;
...
...
@@ -1338,7 +1337,7 @@ int jfs_mknod(struct inode *dir, struct dentry *dentry, int mode, int rdev)
if
((
rc
=
dtInsert
(
tid
,
dir
,
&
dname
,
&
ino
,
&
btstack
)))
goto
out3
;
ip
->
i_op
=
&
jfs_
special
_inode_operations
;
ip
->
i_op
=
&
jfs_
file
_inode_operations
;
init_special_inode
(
ip
,
ip
->
i_mode
,
rdev
);
insert_inode_hash
(
ip
);
...
...
fs/jfs/resize.c
View file @
e30b4514
...
...
@@ -79,9 +79,8 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize)
int
log_formatted
=
0
;
struct
inode
*
iplist
[
1
];
struct
jfs_superblock
*
j_sb
,
*
j_sb2
;
metapage_t
*
sbp
,
*
sb2p
;
uint
old_agsize
;
struct
buffer_head
*
bh
;
struct
buffer_head
*
bh
,
*
bh2
;
/* If the volume hasn't grown, get out now */
...
...
@@ -230,9 +229,9 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize)
*/
/* read in superblock */
if
((
rc
=
readSuper
(
sb
,
&
sbp
)))
if
((
rc
=
readSuper
(
sb
,
&
bh
)))
goto
error_out
;
j_sb
=
(
struct
jfs_superblock
*
)
(
sbp
->
data
)
;
j_sb
=
(
struct
jfs_superblock
*
)
bh
->
b_data
;
/* mark extendfs() in progress */
j_sb
->
s_state
|=
cpu_to_le32
(
FM_EXTENDFS
);
...
...
@@ -243,7 +242,10 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize)
PXDlength
(
&
j_sb
->
s_xlogpxd
,
newLogSize
);
/* synchronously update superblock */
flush_metapage
(
sbp
);
mark_buffer_dirty
(
bh
);
ll_rw_block
(
WRITE
,
1
,
&
bh
);
wait_on_buffer
(
bh
);
brelse
(
bh
);
/*
* format new inline log synchronously;
...
...
@@ -474,12 +476,13 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize)
diWriteSpecial
(
ipbmap2
,
1
);
diFreeSpecial
(
ipbmap2
);
/*
* update superblock
*/
if
((
rc
=
readSuper
(
sb
,
&
sbp
)))
if
((
rc
=
readSuper
(
sb
,
&
bh
)))
goto
error_out
;
j_sb
=
(
struct
jfs_superblock
*
)
(
sbp
->
data
)
;
j_sb
=
(
struct
jfs_superblock
*
)
bh
->
b_data
;
/* mark extendfs() completion */
j_sb
->
s_state
&=
cpu_to_le32
(
~
FM_EXTENDFS
);
...
...
@@ -503,17 +506,22 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize)
/* sb->s_fsckloglen remains the same */
/* Update secondary superblock */
sb2p
=
read_metapage
(
sbi
->
direct_inode
,
SUPER2_OFF
>>
sb
->
s_blocksize_bits
,
PSIZE
,
1
);
if
(
sb2p
)
{
j_sb2
=
(
struct
jfs_superblock
*
)
(
sb2p
->
data
);
bh2
=
sb_bread
(
sb
,
SUPER2_OFF
>>
sb
->
s_blocksize_bits
);
if
(
bh2
)
{
j_sb2
=
(
struct
jfs_superblock
*
)
bh2
->
b_data
;
memcpy
(
j_sb2
,
j_sb
,
sizeof
(
struct
jfs_superblock
));
flush_metapage
(
sb2p
);
mark_buffer_dirty
(
bh
);
ll_rw_block
(
WRITE
,
1
,
&
bh2
);
wait_on_buffer
(
bh2
);
brelse
(
bh
);
}
/* write primary superblock */
flush_metapage
(
sbp
);
mark_buffer_dirty
(
bh
);
ll_rw_block
(
WRITE
,
1
,
&
bh
);
wait_on_buffer
(
bh
);
brelse
(
bh
);
goto
resume
;
...
...
fs/jfs/super.c
View file @
e30b4514
...
...
@@ -142,17 +142,6 @@ static void jfs_put_super(struct super_block *sb)
unload_nls
(
sbi
->
nls_tab
);
sbi
->
nls_tab
=
NULL
;
/*
* We need to clean out the direct_inode pages since this inode
* is not in the inode hash.
*/
filemap_fdatawrite
(
sbi
->
direct_inode
->
i_mapping
);
filemap_fdatawait
(
sbi
->
direct_inode
->
i_mapping
);
truncate_inode_pages
(
sbi
->
direct_mapping
,
0
);
iput
(
sbi
->
direct_inode
);
sbi
->
direct_inode
=
NULL
;
sbi
->
direct_mapping
=
NULL
;
kfree
(
sbi
);
}
...
...
@@ -221,7 +210,6 @@ static int parse_options(char *options, struct super_block *sb, s64 *newLVSize)
int
jfs_remount
(
struct
super_block
*
sb
,
int
*
flags
,
char
*
data
)
{
struct
jfs_sb_info
*
sbi
=
JFS_SBI
(
sb
);
s64
newLVSize
=
0
;
int
rc
=
0
;
...
...
@@ -239,15 +227,9 @@ int jfs_remount(struct super_block *sb, int *flags, char *data)
return
rc
;
}
if
((
sb
->
s_flags
&
MS_RDONLY
)
&&
!
(
*
flags
&
MS_RDONLY
))
{
/*
* Invalidate any previously read metadata. fsck may
* have changed the on-disk data since we mounted r/o
*/
truncate_inode_pages
(
sbi
->
direct_mapping
,
0
);
if
((
sb
->
s_flags
&
MS_RDONLY
)
&&
!
(
*
flags
&
MS_RDONLY
))
return
jfs_mount_rw
(
sb
,
1
);
}
else
if
((
!
(
sb
->
s_flags
&
MS_RDONLY
))
&&
(
*
flags
&
MS_RDONLY
))
else
if
((
!
(
sb
->
s_flags
&
MS_RDONLY
))
&&
(
*
flags
&
MS_RDONLY
))
return
jfs_umount_rw
(
sb
);
return
0
;
...
...
@@ -289,28 +271,13 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent)
sb
->
s_op
=
&
jfs_super_operations
;
sb
->
s_export_op
=
&
jfs_export_operations
;
/*
* Initialize direct-mapping inode/address-space
*/
inode
=
new_inode
(
sb
);
if
(
inode
==
NULL
)
goto
out_kfree
;
inode
->
i_ino
=
0
;
inode
->
i_nlink
=
1
;
inode
->
i_size
=
0x0000010000000000LL
;
inode
->
i_mapping
->
a_ops
=
&
direct_aops
;
inode
->
i_mapping
->
gfp_mask
=
GFP_NOFS
;
sbi
->
direct_inode
=
inode
;
sbi
->
direct_mapping
=
inode
->
i_mapping
;
rc
=
jfs_mount
(
sb
);
if
(
rc
)
{
if
(
!
silent
)
{
jERROR
(
1
,
(
"jfs_mount failed w/return code = %d
\n
"
,
rc
));
}
goto
out_
mount_failed
;
goto
out_
kfree
;
}
if
(
sb
->
s_flags
&
MS_RDONLY
)
sbi
->
log
=
0
;
...
...
@@ -360,14 +327,6 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent)
if
(
rc
)
{
jERROR
(
1
,
(
"jfs_umount failed with return code %d
\n
"
,
rc
));
}
out_mount_failed:
filemap_fdatawrite
(
sbi
->
direct_inode
->
i_mapping
);
filemap_fdatawait
(
sbi
->
direct_inode
->
i_mapping
);
truncate_inode_pages
(
sbi
->
direct_mapping
,
0
);
make_bad_inode
(
sbi
->
direct_inode
);
iput
(
sbi
->
direct_inode
);
sbi
->
direct_inode
=
NULL
;
sbi
->
direct_mapping
=
NULL
;
out_kfree:
if
(
sbi
->
nls_tab
)
unload_nls
(
sbi
->
nls_tab
);
...
...
fs/jfs/xattr.c
View file @
e30b4514
...
...
@@ -79,10 +79,10 @@ struct ea_buffer {
#define EA_MALLOC 0x0008
/* Forward references */
void
ea_release
(
struct
inode
*
inode
,
struct
ea_buffer
*
ea_buf
);
static
void
ea_release
(
struct
inode
*
inode
,
struct
ea_buffer
*
ea_buf
);
/*
* NAME:
jfs_WriteEAInL
ine
* NAME:
ea_write_inl
ine
*
* FUNCTION: Attempt to write an EA inline if area is available
*
...
...
@@ -103,8 +103,8 @@ void ea_release(struct inode *inode, struct ea_buffer *ea_buf);
*
* RETURNS: 0 for successful copy to inline area; -1 if area not available
*/
static
int
jfs_WriteEAInL
ine
(
struct
inode
*
ip
,
struct
jfs_ea_list
*
ealist
,
int
size
,
dxd_t
*
ea
)
static
int
ea_write_inl
ine
(
struct
inode
*
ip
,
struct
jfs_ea_list
*
ealist
,
int
size
,
dxd_t
*
ea
)
{
struct
jfs_inode_info
*
ji
=
JFS_IP
(
ip
);
...
...
@@ -144,7 +144,7 @@ static int jfs_WriteEAInLine(struct inode *ip, struct jfs_ea_list *ealist,
}
/*
* NAME:
jfs_WriteEA
* NAME:
ea_write
*
* FUNCTION: Write an EA for an inode
*
...
...
@@ -162,7 +162,7 @@ static int jfs_WriteEAInLine(struct inode *ip, struct jfs_ea_list *ealist,
*
* RETURNS: 0 for success; Anything else indicates failure
*/
static
int
jfs_WriteEA
(
struct
inode
*
ip
,
struct
jfs_ea_list
*
ealist
,
int
size
,
static
int
ea_write
(
struct
inode
*
ip
,
struct
jfs_ea_list
*
ealist
,
int
size
,
dxd_t
*
ea
)
{
struct
super_block
*
sb
=
ip
->
i_sb
;
...
...
@@ -181,7 +181,7 @@ static int jfs_WriteEA(struct inode *ip, struct jfs_ea_list *ealist, int size,
* and empty EAs are all in-linable, provided the space exists.
*/
if
(
!
ealist
||
size
<=
sizeof
(
ji
->
i_inline_ea
))
{
if
(
!
jfs_WriteEAInL
ine
(
ip
,
ealist
,
size
,
ea
))
if
(
!
ea_write_inl
ine
(
ip
,
ealist
,
size
,
ea
))
return
0
;
}
...
...
@@ -257,7 +257,7 @@ static int jfs_WriteEA(struct inode *ip, struct jfs_ea_list *ealist, int size,
}
/*
* NAME:
jfs_ReadEAInL
ine
* NAME:
ea_read_inl
ine
*
* FUNCTION: Read an inlined EA into user's buffer
*
...
...
@@ -267,7 +267,7 @@ static int jfs_WriteEA(struct inode *ip, struct jfs_ea_list *ealist, int size,
*
* RETURNS: 0
*/
static
int
jfs_ReadEAInL
ine
(
struct
inode
*
ip
,
struct
jfs_ea_list
*
ealist
)
static
int
ea_read_inl
ine
(
struct
inode
*
ip
,
struct
jfs_ea_list
*
ealist
)
{
struct
jfs_inode_info
*
ji
=
JFS_IP
(
ip
);
int
ea_size
=
sizeDXD
(
&
ji
->
ea
);
...
...
@@ -288,7 +288,7 @@ static int jfs_ReadEAInLine(struct inode *ip, struct jfs_ea_list *ealist)
}
/*
* NAME:
jfs_ReadEA
* NAME:
ea_read
*
* FUNCTION: copy EA data into user's buffer
*
...
...
@@ -296,11 +296,11 @@ static int jfs_ReadEAInLine(struct inode *ip, struct jfs_ea_list *ealist)
* ip - Inode pointer
* ealist - Pointer to buffer to fill in with EA
*
* NOTES: If EA is inline calls
jfs_ReadEAInL
ine() to copy EA.
* NOTES: If EA is inline calls
ea_read_inl
ine() to copy EA.
*
* RETURNS: 0 for success; other indicates failure
*/
static
int
jfs_ReadEA
(
struct
inode
*
ip
,
struct
jfs_ea_list
*
ealist
)
static
int
ea_read
(
struct
inode
*
ip
,
struct
jfs_ea_list
*
ealist
)
{
struct
super_block
*
sb
=
ip
->
i_sb
;
struct
jfs_inode_info
*
ji
=
JFS_IP
(
ip
);
...
...
@@ -315,7 +315,7 @@ static int jfs_ReadEA(struct inode *ip, struct jfs_ea_list *ealist)
/* quick check for in-line EA */
if
(
ji
->
ea
.
flag
&
DXD_INLINE
)
return
jfs_ReadEAInL
ine
(
ip
,
ealist
);
return
ea_read_inl
ine
(
ip
,
ealist
);
nbytes
=
sizeDXD
(
&
ji
->
ea
);
assert
(
nbytes
);
...
...
@@ -372,7 +372,7 @@ static int jfs_ReadEA(struct inode *ip, struct jfs_ea_list *ealist)
*
* RETURNS: 0 for success; Other indicates failure
*/
int
ea_get
(
struct
inode
*
inode
,
struct
ea_buffer
*
ea_buf
,
int
min_size
)
static
int
ea_get
(
struct
inode
*
inode
,
struct
ea_buffer
*
ea_buf
,
int
min_size
)
{
struct
jfs_inode_info
*
ji
=
JFS_IP
(
inode
);
struct
super_block
*
sb
=
inode
->
i_sb
;
...
...
@@ -436,8 +436,7 @@ int ea_get(struct inode *inode, struct ea_buffer *ea_buf, int min_size)
if
(
ea_size
==
0
)
return
0
;
rc
=
jfs_ReadEA
(
inode
,
ea_buf
->
xattr
);
if
(
rc
)
{
if
((
rc
=
ea_read
(
inode
,
ea_buf
->
xattr
)))
{
kfree
(
ea_buf
->
xattr
);
ea_buf
->
xattr
=
NULL
;
return
rc
;
...
...
@@ -472,8 +471,7 @@ int ea_get(struct inode *inode, struct ea_buffer *ea_buf, int min_size)
~
(
sb
->
s_blocksize
-
1
);
if
(
ea_size
==
0
)
return
0
;
rc
=
jfs_ReadEA
(
inode
,
ea_buf
->
xattr
);
if
(
rc
)
{
if
((
rc
=
ea_read
(
inode
,
ea_buf
->
xattr
)))
{
discard_metapage
(
ea_buf
->
mp
);
dbFree
(
inode
,
blkno
,
(
s64
)
blocks_needed
);
return
rc
;
...
...
@@ -500,7 +498,7 @@ int ea_get(struct inode *inode, struct ea_buffer *ea_buf, int min_size)
return
ea_size
;
}
void
ea_release
(
struct
inode
*
inode
,
struct
ea_buffer
*
ea_buf
)
static
void
ea_release
(
struct
inode
*
inode
,
struct
ea_buffer
*
ea_buf
)
{
if
(
ea_buf
->
flag
&
EA_MALLOC
)
kfree
(
ea_buf
->
xattr
);
...
...
@@ -514,7 +512,7 @@ void ea_release(struct inode *inode, struct ea_buffer *ea_buf)
}
}
int
ea_put
(
struct
inode
*
inode
,
struct
ea_buffer
*
ea_buf
,
int
new_size
)
static
int
ea_put
(
struct
inode
*
inode
,
struct
ea_buffer
*
ea_buf
,
int
new_size
)
{
struct
jfs_inode_info
*
ji
=
JFS_IP
(
inode
);
unsigned
long
old_blocks
,
new_blocks
;
...
...
@@ -532,16 +530,14 @@ int ea_put(struct inode *inode, struct ea_buffer *ea_buf, int new_size)
DXDaddress
(
&
ea_buf
->
new_ea
,
0
);
DXDlength
(
&
ea_buf
->
new_ea
,
0
);
}
else
if
(
ea_buf
->
flag
&
EA_MALLOC
)
{
rc
=
jfs_WriteEA
(
inode
,
ea_buf
->
xattr
,
new_size
,
&
ea_buf
->
new_ea
);
rc
=
ea_write
(
inode
,
ea_buf
->
xattr
,
new_size
,
&
ea_buf
->
new_ea
);
kfree
(
ea_buf
->
xattr
);
}
else
if
(
ea_buf
->
flag
&
EA_NEW
)
{
/* We have already allocated a new dxd */
flush_metapage
(
ea_buf
->
mp
);
}
else
{
/* ->xattr must point to original ea's metapage */
rc
=
jfs_WriteEA
(
inode
,
ea_buf
->
xattr
,
new_size
,
&
ea_buf
->
new_ea
);
rc
=
ea_write
(
inode
,
ea_buf
->
xattr
,
new_size
,
&
ea_buf
->
new_ea
);
discard_metapage
(
ea_buf
->
mp
);
}
if
(
rc
)
...
...
include/linux/ide.h
View file @
e30b4514
...
...
@@ -464,7 +464,6 @@ typedef struct ide_drive_s {
byte
nice1
;
/* flag: give potential excess bandwidth */
unsigned
present
:
1
;
/* drive is physically present */
unsigned
noprobe
:
1
;
/* from: hdx=noprobe */
unsigned
busy
:
1
;
/* currently doing revalidate_disk() */
unsigned
removable
:
1
;
/* 1 if need to do check_media_change */
unsigned
forced_geom
:
1
;
/* 1 if hdx=c,h,s was given at boot */
unsigned
no_unmask
:
1
;
/* disallow setting unmask bit */
...
...
@@ -506,7 +505,6 @@ typedef struct ide_drive_s {
unsigned
long
long
capacity48
;
/* total number of sectors */
unsigned
int
drive_data
;
/* for use by tuneproc/selectproc as needed */
struct
hwif_s
*
hwif
;
/* actually (ide_hwif_t *) */
wait_queue_head_t
wqueue
;
/* used to wait for drive in open() */
struct
hd_driveid
*
id
;
/* drive model identification info */
struct
hd_struct
*
part
;
/* drive partition table */
char
name
[
4
];
/* drive name, such as "hda" */
...
...
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