Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
5153f7e6
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5153f7e6
编写于
8月 16, 2005
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge head 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/shaggy/jfs-2.6
上级
ca27ea48
2d610b80
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
34 addition
and
24 deletion
+34
-24
fs/jfs/inode.c
fs/jfs/inode.c
+4
-0
fs/jfs/jfs_logmgr.c
fs/jfs/jfs_logmgr.c
+19
-17
fs/jfs/jfs_logmgr.h
fs/jfs/jfs_logmgr.h
+1
-1
fs/jfs/jfs_txnmgr.c
fs/jfs/jfs_txnmgr.c
+7
-5
fs/jfs/super.c
fs/jfs/super.c
+3
-1
未找到文件。
fs/jfs/inode.c
浏览文件 @
5153f7e6
...
@@ -128,6 +128,10 @@ void jfs_delete_inode(struct inode *inode)
...
@@ -128,6 +128,10 @@ 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
(
is_bad_inode
(
inode
)
||
(
JFS_IP
(
inode
)
->
fileset
!=
cpu_to_le32
(
FILESYSTEM_I
)))
return
;
if
(
test_cflag
(
COMMIT_Freewmap
,
inode
))
if
(
test_cflag
(
COMMIT_Freewmap
,
inode
))
jfs_free_zero_link
(
inode
);
jfs_free_zero_link
(
inode
);
...
...
fs/jfs/jfs_logmgr.c
浏览文件 @
5153f7e6
...
@@ -191,7 +191,7 @@ static int lbmIOWait(struct lbuf * bp, int flag);
...
@@ -191,7 +191,7 @@ static int lbmIOWait(struct lbuf * bp, int flag);
static
bio_end_io_t
lbmIODone
;
static
bio_end_io_t
lbmIODone
;
static
void
lbmStartIO
(
struct
lbuf
*
bp
);
static
void
lbmStartIO
(
struct
lbuf
*
bp
);
static
void
lmGCwrite
(
struct
jfs_log
*
log
,
int
cant_block
);
static
void
lmGCwrite
(
struct
jfs_log
*
log
,
int
cant_block
);
static
int
lmLogSync
(
struct
jfs_log
*
log
,
int
nosyncwait
);
static
int
lmLogSync
(
struct
jfs_log
*
log
,
int
hard_sync
);
...
@@ -915,19 +915,17 @@ static void lmPostGC(struct lbuf * bp)
...
@@ -915,19 +915,17 @@ static void lmPostGC(struct lbuf * bp)
* if new sync address is available
* if new sync address is available
* (normally the case if sync() is executed by back-ground
* (normally the case if sync() is executed by back-ground
* process).
* process).
* if not, explicitly run jfs_blogsync() to initiate
* getting of new sync address.
* calculate new value of i_nextsync which determines when
* calculate new value of i_nextsync which determines when
* this code is called again.
* this code is called again.
*
*
* PARAMETERS: log - log structure
* PARAMETERS: log - log structure
*
nosyncwait - 1 if called asynchronously
*
hard_sync - 1 to force all metadata to be written
*
*
* RETURN: 0
* RETURN: 0
*
*
* serialization: LOG_LOCK() held on entry/exit
* serialization: LOG_LOCK() held on entry/exit
*/
*/
static
int
lmLogSync
(
struct
jfs_log
*
log
,
int
nosyncwait
)
static
int
lmLogSync
(
struct
jfs_log
*
log
,
int
hard_sync
)
{
{
int
logsize
;
int
logsize
;
int
written
;
/* written since last syncpt */
int
written
;
/* written since last syncpt */
...
@@ -941,11 +939,18 @@ static int lmLogSync(struct jfs_log * log, int nosyncwait)
...
@@ -941,11 +939,18 @@ static int lmLogSync(struct jfs_log * log, int nosyncwait)
unsigned
long
flags
;
unsigned
long
flags
;
/* push dirty metapages out to disk */
/* push dirty metapages out to disk */
list_for_each_entry
(
sbi
,
&
log
->
sb_list
,
log_list
)
{
if
(
hard_sync
)
filemap_flush
(
sbi
->
ipbmap
->
i_mapping
);
list_for_each_entry
(
sbi
,
&
log
->
sb_list
,
log_list
)
{
filemap_flush
(
sbi
->
ipimap
->
i_mapping
);
filemap_fdatawrite
(
sbi
->
ipbmap
->
i_mapping
);
filemap_flush
(
sbi
->
direct_inode
->
i_mapping
);
filemap_fdatawrite
(
sbi
->
ipimap
->
i_mapping
);
}
filemap_fdatawrite
(
sbi
->
direct_inode
->
i_mapping
);
}
else
list_for_each_entry
(
sbi
,
&
log
->
sb_list
,
log_list
)
{
filemap_flush
(
sbi
->
ipbmap
->
i_mapping
);
filemap_flush
(
sbi
->
ipimap
->
i_mapping
);
filemap_flush
(
sbi
->
direct_inode
->
i_mapping
);
}
/*
/*
* forward syncpt
* forward syncpt
...
@@ -1021,10 +1026,6 @@ static int lmLogSync(struct jfs_log * log, int nosyncwait)
...
@@ -1021,10 +1026,6 @@ static int lmLogSync(struct jfs_log * log, int nosyncwait)
/* next syncpt trigger = written + more */
/* next syncpt trigger = written + more */
log
->
nextsync
=
written
+
more
;
log
->
nextsync
=
written
+
more
;
/* return if lmLogSync() from outside of transaction, e.g., sync() */
if
(
nosyncwait
)
return
lsn
;
/* if number of bytes written from last sync point is more
/* if number of bytes written from last sync point is more
* than 1/4 of the log size, stop new transactions from
* than 1/4 of the log size, stop new transactions from
* starting until all current transactions are completed
* starting until all current transactions are completed
...
@@ -1049,11 +1050,12 @@ static int lmLogSync(struct jfs_log * log, int nosyncwait)
...
@@ -1049,11 +1050,12 @@ static int lmLogSync(struct jfs_log * log, int nosyncwait)
*
*
* FUNCTION: write log SYNCPT record for specified log
* FUNCTION: write log SYNCPT record for specified log
*
*
* PARAMETERS: log - log structure
* PARAMETERS: log - log structure
* hard_sync - set to 1 to force metadata to be written
*/
*/
void
jfs_syncpt
(
struct
jfs_log
*
log
)
void
jfs_syncpt
(
struct
jfs_log
*
log
,
int
hard_sync
)
{
LOG_LOCK
(
log
);
{
LOG_LOCK
(
log
);
lmLogSync
(
log
,
1
);
lmLogSync
(
log
,
hard_sync
);
LOG_UNLOCK
(
log
);
LOG_UNLOCK
(
log
);
}
}
...
...
fs/jfs/jfs_logmgr.h
浏览文件 @
5153f7e6
...
@@ -510,6 +510,6 @@ extern int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize);
...
@@ -510,6 +510,6 @@ extern int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize);
extern
int
lmGroupCommit
(
struct
jfs_log
*
,
struct
tblock
*
);
extern
int
lmGroupCommit
(
struct
jfs_log
*
,
struct
tblock
*
);
extern
int
jfsIOWait
(
void
*
);
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
,
int
hard_sync
);
#endif
/* _H_JFS_LOGMGR */
#endif
/* _H_JFS_LOGMGR */
fs/jfs/jfs_txnmgr.c
浏览文件 @
5153f7e6
...
@@ -552,6 +552,11 @@ void txEnd(tid_t tid)
...
@@ -552,6 +552,11 @@ void txEnd(tid_t tid)
* synchronize with logsync barrier
* synchronize with logsync barrier
*/
*/
if
(
test_bit
(
log_SYNCBARRIER
,
&
log
->
flag
))
{
if
(
test_bit
(
log_SYNCBARRIER
,
&
log
->
flag
))
{
TXN_UNLOCK
();
/* write dirty metadata & forward log syncpt */
jfs_syncpt
(
log
,
1
);
jfs_info
(
"log barrier off: 0x%x"
,
log
->
lsn
);
jfs_info
(
"log barrier off: 0x%x"
,
log
->
lsn
);
/* enable new transactions start */
/* enable new transactions start */
...
@@ -560,11 +565,6 @@ void txEnd(tid_t tid)
...
@@ -560,11 +565,6 @@ void txEnd(tid_t tid)
/* wakeup all waitors for logsync barrier */
/* wakeup all waitors for logsync barrier */
TXN_WAKEUP
(
&
log
->
syncwait
);
TXN_WAKEUP
(
&
log
->
syncwait
);
TXN_UNLOCK
();
/* forward log syncpt */
jfs_syncpt
(
log
);
goto
wakeup
;
goto
wakeup
;
}
}
}
}
...
@@ -657,7 +657,9 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp,
...
@@ -657,7 +657,9 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp,
/* only anonymous txn.
/* only anonymous txn.
* Remove from anon_list
* Remove from anon_list
*/
*/
TXN_LOCK
();
list_del_init
(
&
jfs_ip
->
anon_inode_list
);
list_del_init
(
&
jfs_ip
->
anon_inode_list
);
TXN_UNLOCK
();
}
}
jfs_ip
->
atlhead
=
tlck
->
next
;
jfs_ip
->
atlhead
=
tlck
->
next
;
}
else
{
}
else
{
...
...
fs/jfs/super.c
浏览文件 @
5153f7e6
...
@@ -114,6 +114,8 @@ static void jfs_destroy_inode(struct inode *inode)
...
@@ -114,6 +114,8 @@ static void jfs_destroy_inode(struct inode *inode)
{
{
struct
jfs_inode_info
*
ji
=
JFS_IP
(
inode
);
struct
jfs_inode_info
*
ji
=
JFS_IP
(
inode
);
BUG_ON
(
!
list_empty
(
&
ji
->
anon_inode_list
));
spin_lock_irq
(
&
ji
->
ag_lock
);
spin_lock_irq
(
&
ji
->
ag_lock
);
if
(
ji
->
active_ag
!=
-
1
)
{
if
(
ji
->
active_ag
!=
-
1
)
{
struct
bmap
*
bmap
=
JFS_SBI
(
inode
->
i_sb
)
->
bmap
;
struct
bmap
*
bmap
=
JFS_SBI
(
inode
->
i_sb
)
->
bmap
;
...
@@ -531,7 +533,7 @@ static int jfs_sync_fs(struct super_block *sb, int wait)
...
@@ -531,7 +533,7 @@ static int jfs_sync_fs(struct super_block *sb, int wait)
/* log == NULL indicates read-only mount */
/* log == NULL indicates read-only mount */
if
(
log
)
{
if
(
log
)
{
jfs_flush_journal
(
log
,
wait
);
jfs_flush_journal
(
log
,
wait
);
jfs_syncpt
(
log
);
jfs_syncpt
(
log
,
0
);
}
}
return
0
;
return
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录