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
cb311ab3
Commit
cb311ab3
authored
Apr 03, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Automerge
parents
e5959d66
db468b69
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
141 deletions
+5
-141
fs/jfs/jfs_logmgr.c
fs/jfs/jfs_logmgr.c
+1
-96
fs/jfs/namei.c
fs/jfs/namei.c
+4
-45
No files found.
fs/jfs/jfs_logmgr.c
View file @
cb311ab3
...
...
@@ -185,9 +185,7 @@ static void lbmWrite(log_t * log, lbuf_t * bp, int flag, int cant_block);
static
void
lbmDirectWrite
(
log_t
*
log
,
lbuf_t
*
bp
,
int
flag
);
static
int
lbmIOWait
(
lbuf_t
*
bp
,
int
flag
);
static
bio_end_io_t
lbmIODone
;
#ifdef _STILL_TO_PORT
static
void
lbmDirectIODone
(
iobuf_t
*
ddbp
);
#endif
/* _STILL_TO_PORT */
void
lbmStartIO
(
lbuf_t
*
bp
);
void
lmGCwrite
(
log_t
*
log
,
int
cant_block
);
...
...
@@ -1810,42 +1808,6 @@ static void lbmfree(lbuf_t * bp)
}
#ifdef _THIS_IS_NOT_USED
/*
* lbmRelease()
*
* remove the log buffer from log device write queue;
*/
static
void
lbmRelease
(
log_t
*
log
,
uint
flag
)
{
lbuf_t
*
bp
,
*
tail
;
unsigned
long
flags
;
bp
=
log
->
bp
;
LCACHE_LOCK
(
flags
);
tail
=
log
->
wqueue
;
/* single element queue */
if
(
bp
==
tail
)
{
log
->
wqueue
=
NULL
;
bp
->
l_wqnext
=
NULL
;
}
/* multi element queue */
else
{
tail
->
l_wqnext
=
bp
->
l_wqnext
;
bp
->
l_wqnext
=
NULL
;
}
if
(
flag
&
lbmFREE
)
lbmfree
(
bp
);
LCACHE_UNLOCK
(
flags
);
}
#endif
/* _THIS_IS_NOT_USED */
/*
* NAME: lbmRedrive
*
...
...
@@ -2272,63 +2234,6 @@ int jfsIOWait(void *arg)
}
#ifdef _STILL_TO_PORT
/*
* lbmDirectIODone()
*
* iodone() for lbmDirectWrite() to bypass write queue;
* executed at INTIODONE level;
*/
static
void
lbmDirectIODone
(
iobuf_t
*
iobp
)
{
lbuf_t
*
bp
;
unsigned
long
flags
;
/*
* get back jfs buffer bound to the io buffer
*/
bp
=
(
lbuf_t
*
)
iobp
->
b_jfsbp
;
jEVENT
(
0
,
(
"lbmDirectIODone: bp:0x%p flag:0x%x
\n
"
,
bp
,
bp
->
l_flag
));
LCACHE_LOCK
(
flags
);
/* disable+lock */
bp
->
l_flag
|=
lbmDONE
;
if
(
iobp
->
b_flags
&
B_ERROR
)
{
bp
->
l_flag
|=
lbmERROR
;
#ifdef _JFS_OS2
SysLogError
();
#endif
}
/*
* pageout completion
*/
bp
->
l_flag
&=
~
lbmWRITE
;
/*
* synchronous pageout:
*/
if
(
bp
->
l_flag
&
lbmSYNC
)
{
LCACHE_UNLOCK
(
flags
);
/* unlock+enable */
/* wakeup I/O initiator */
LCACHE_WAKEUP
(
&
bp
->
l_ioevent
);
}
/*
* asynchronous pageout:
*/
else
{
assert
(
bp
->
l_flag
&
lbmRELEASE
);
assert
(
bp
->
l_flag
&
lbmFREE
);
lbmfree
(
bp
);
LCACHE_UNLOCK
(
flags
);
/* unlock+enable */
}
}
#endif
/* _STILL_TO_PORT */
#ifdef _STILL_TO_PORT
/*
* NAME: lmLogFormat()/jfs_logform()
...
...
fs/jfs/namei.c
View file @
cb311ab3
...
...
@@ -587,7 +587,7 @@ int jfs_unlink(struct inode *dip, struct dentry *dentry)
*/
s64
commitZeroLink
(
tid_t
tid
,
struct
inode
*
ip
)
{
int
filetype
,
committype
;
int
filetype
;
tblock_t
*
tblk
;
jFYI
(
1
,
(
"commitZeroLink: tid = %d, ip = 0x%p
\n
"
,
tid
,
ip
));
...
...
@@ -608,67 +608,26 @@ s64 commitZeroLink(tid_t tid, struct inode *ip)
return
0
;
}
#ifdef _STILL_TO_PORT
/*
* free from block allocation map:
*
* if there is no cache control element associated with
* the file, free resources in both persistent and work map;
* otherwise just persistent map.
*/
if
(
ip
->
i_cacheid
)
{
committype
=
COMMIT_PMAP
;
/* mark for iClose() to free from working map */
set_cflag
(
COMMIT_Freewmap
,
ip
);
}
else
committype
=
COMMIT_PWMAP
;
#else
/* _STILL_TO_PORT */
set_cflag
(
COMMIT_Freewmap
,
ip
);
committype
=
COMMIT_PMAP
;
#endif
/* _STILL_TO_PORT */
/* mark transaction of block map update type */
tblk
=
tid_to_tblock
(
tid
);
tblk
->
xflag
|=
committype
;
tblk
->
xflag
|=
COMMIT_PMAP
;
/*
* free EA
*/
if
(
JFS_IP
(
ip
)
->
ea
.
flag
&
DXD_EXTENT
)
{
#ifdef _STILL_TO_PORT
/* free EA pages from cache */
if
(
committype
==
COMMIT_PWMAP
)
bmExtentInvalidate
(
ip
,
addressDXD
(
&
ip
->
i_ea
),
lengthDXD
(
&
ip
->
i_ea
));
#endif
/* _STILL_TO_PORT */
if
(
JFS_IP
(
ip
)
->
ea
.
flag
&
DXD_EXTENT
)
/* acquire maplock on EA to be freed from block map */
txEA
(
tid
,
ip
,
&
JFS_IP
(
ip
)
->
ea
,
NULL
);
if
(
committype
==
COMMIT_PWMAP
)
JFS_IP
(
ip
)
->
ea
.
flag
=
0
;
}
/*
* free ACL
*/
if
(
JFS_IP
(
ip
)
->
acl
.
flag
&
DXD_EXTENT
)
{
#ifdef _STILL_TO_PORT
/* free ACL pages from cache */
if
(
committype
==
COMMIT_PWMAP
)
bmExtentInvalidate
(
ip
,
addressDXD
(
&
ip
->
i_acl
),
lengthDXD
(
&
ip
->
i_acl
));
#endif
/* _STILL_TO_PORT */
if
(
JFS_IP
(
ip
)
->
acl
.
flag
&
DXD_EXTENT
)
/* acquire maplock on EA to be freed from block map */
txEA
(
tid
,
ip
,
&
JFS_IP
(
ip
)
->
acl
,
NULL
);
if
(
committype
==
COMMIT_PWMAP
)
JFS_IP
(
ip
)
->
acl
.
flag
=
0
;
}
/*
* free xtree/data (truncate to zero length):
* free xtree/data pages from cache if COMMIT_PWMAP,
...
...
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