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
697d719c
Commit
697d719c
authored
Apr 08, 2003
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] merge over some lost changes from the XFS tree
parent
40198cf1
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
55 additions
and
109 deletions
+55
-109
fs/xfs/linux/xfs_aops.c
fs/xfs/linux/xfs_aops.c
+8
-10
fs/xfs/linux/xfs_file.c
fs/xfs/linux/xfs_file.c
+3
-3
fs/xfs/linux/xfs_ioctl.c
fs/xfs/linux/xfs_ioctl.c
+0
-5
fs/xfs/linux/xfs_lrw.c
fs/xfs/linux/xfs_lrw.c
+1
-1
fs/xfs/linux/xfs_lrw.h
fs/xfs/linux/xfs_lrw.h
+1
-1
fs/xfs/linux/xfs_super.c
fs/xfs/linux/xfs_super.c
+1
-1
fs/xfs/support/atomic.h
fs/xfs/support/atomic.h
+0
-63
fs/xfs/xfs_dmapi.h
fs/xfs/xfs_dmapi.h
+2
-2
fs/xfs/xfs_iget.c
fs/xfs/xfs_iget.c
+1
-1
fs/xfs/xfs_rw.h
fs/xfs/xfs_rw.h
+38
-22
No files found.
fs/xfs/linux/xfs_aops.c
View file @
697d719c
...
...
@@ -163,7 +163,7 @@ map_buffer_at_offset(
delta
-=
mp
->
pbm_offset
;
delta
>>=
block_bits
;
sector_shift
=
block_bits
-
9
;
sector_shift
=
block_bits
-
BBSHIFT
;
bn
=
mp
->
pbm_bn
>>
sector_shift
;
bn
+=
delta
;
ASSERT
((
bn
<<
sector_shift
)
>=
mp
->
pbm_bn
);
...
...
@@ -285,7 +285,7 @@ probe_unmapped_cluster(
total
+=
bh
->
b_size
;
}
while
((
bh
=
bh
->
b_this_page
)
!=
head
);
/*
i
f we reached the end of the page, sum forwards in
/*
I
f we reached the end of the page, sum forwards in
* following pages.
*/
if
(
bh
==
head
)
{
...
...
@@ -735,8 +735,8 @@ page_state_convert(
page_dirty
=
0
;
}
}
else
if
(
startio
)
{
if
(
buffer_uptodate
(
bh
)
)
{
lock_buffer
(
bh
);
if
(
buffer_uptodate
(
bh
)
&&
!
test_and_set_bit
(
BH_Lock
,
&
bh
->
b_state
))
{
bh_arr
[
cnt
++
]
=
bh
;
page_dirty
=
0
;
}
...
...
@@ -759,8 +759,7 @@ page_state_convert(
}
if
(
mp
)
{
cluster_write
(
inode
,
page
->
index
+
1
,
mp
,
startio
,
unmapped
);
cluster_write
(
inode
,
page
->
index
+
1
,
mp
,
startio
,
unmapped
);
}
return
page_dirty
;
...
...
@@ -812,8 +811,7 @@ linvfs_get_block_core(
size
=
1
<<
inode
->
i_blkbits
;
VOP_BMAP
(
vp
,
offset
,
size
,
create
?
flags
:
PBF_READ
,
(
struct
page_buf_bmap_s
*
)
&
pbmap
,
&
retpbbm
,
error
);
create
?
flags
:
PBF_READ
,
&
pbmap
,
&
retpbbm
,
error
);
if
(
error
)
return
-
error
;
...
...
@@ -831,7 +829,7 @@ linvfs_get_block_core(
delta
=
offset
-
pbmap
.
pbm_offset
;
delta
>>=
inode
->
i_blkbits
;
bn
=
pbmap
.
pbm_bn
>>
(
inode
->
i_blkbits
-
9
);
bn
=
pbmap
.
pbm_bn
>>
(
inode
->
i_blkbits
-
BBSHIFT
);
bn
+=
delta
;
bh_result
->
b_blocknr
=
bn
;
...
...
fs/xfs/linux/xfs_file.c
View file @
697d719c
/*
* Copyright (c) 2000-200
2
Silicon Graphics, Inc. All Rights Reserved.
* Copyright (c) 2000-200
3
Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
...
...
@@ -136,6 +136,7 @@ linvfs_aio_write(
return
linvfs_writev
(
iocb
->
ki_filp
,
&
iov
,
1
,
&
iocb
->
ki_pos
);
}
STATIC
ssize_t
linvfs_sendfile
(
struct
file
*
filp
,
...
...
@@ -199,9 +200,7 @@ linvfs_fsync(
flags
|=
FSYNC_DATA
;
ASSERT
(
vp
);
VOP_FSYNC
(
vp
,
flags
,
NULL
,
(
xfs_off_t
)
0
,
(
xfs_off_t
)
-
1
,
error
);
return
-
error
;
}
...
...
@@ -288,6 +287,7 @@ linvfs_readdir(
return
-
error
;
}
STATIC
int
linvfs_file_mmap
(
struct
file
*
filp
,
...
...
fs/xfs/linux/xfs_ioctl.c
View file @
697d719c
...
...
@@ -39,11 +39,6 @@
#include <linux/pagemap.h>
extern
int
xfs_change_file_space
(
bhv_desc_t
*
,
int
,
xfs_flock64_t
*
,
xfs_off_t
,
cred_t
*
,
int
);
extern
int
xfs_set_dmattrs
(
bhv_desc_t
*
,
u_int
,
u_int16_t
,
cred_t
*
);
/*
* xfs_find_handle maps from userspace xfs_fsop_handlereq structure to
* a file or fs handle.
...
...
fs/xfs/linux/xfs_lrw.c
View file @
697d719c
/*
* Copyright (c) 2000-200
2
Silicon Graphics, Inc. All Rights Reserved.
* Copyright (c) 2000-200
3
Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
...
...
fs/xfs/linux/xfs_lrw.h
View file @
697d719c
/*
* Copyright (c) 2000-200
2
Silicon Graphics, Inc. All Rights Reserved.
* Copyright (c) 2000-200
3
Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
...
...
fs/xfs/linux/xfs_super.c
View file @
697d719c
fs/xfs/support/atomic.h
deleted
100644 → 0
View file @
40198cf1
/*
* Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/
#ifndef __XFS_SUPPORT_ATOMIC_H__
#define __XFS_SUPPORT_ATOMIC_H__
#include <linux/version.h>
#include <linux/time.h>
#include <linux/wait.h>
#include <linux/sched.h>
#include <asm/atomic.h>
#include <asm/semaphore.h>
/*
* This is used for two variables in XFS, one of which is a debug trace
* buffer index. They are not accessed via any other atomic operations
* so this is safe. All other atomic increments and decrements in XFS
* now use the Linux built-in functions.
*/
extern
spinlock_t
xfs_atomic_spin
;
static
__inline__
int
atomicIncWithWrap
(
int
*
ip
,
int
val
)
{
unsigned
long
flags
;
int
ret
;
spin_lock_irqsave
(
&
xfs_atomic_spin
,
flags
);
ret
=
*
ip
;
(
*
ip
)
++
;
if
(
*
ip
==
val
)
*
ip
=
0
;
spin_unlock_irqrestore
(
&
xfs_atomic_spin
,
flags
);
return
ret
;
}
#endif
/* __XFS_SUPPORT_ATOMIC_H__ */
fs/xfs/xfs_dmapi.h
View file @
697d719c
...
...
@@ -186,7 +186,7 @@ typedef enum {
extern
struct
bhv_vfsops
xfs_dmops
;
extern
void
xfs_dm
_init
(
void
);
extern
void
xfs_dm_ex
it
(
void
);
extern
int
dmapi
_init
(
void
);
extern
void
dmapi_unin
it
(
void
);
#endif
/* __XFS_DMAPI_H__ */
fs/xfs/xfs_iget.c
View file @
697d719c
/*
* Copyright (c) 2000-200
2
Silicon Graphics, Inc. All Rights Reserved.
* Copyright (c) 2000-200
3
Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
...
...
fs/xfs/xfs_rw.h
View file @
697d719c
...
...
@@ -153,24 +153,9 @@ int
xfs_bioerror
(
struct
xfs_buf
*
b
);
/*
* XFS I/O core functions
*/
extern
int
xfs_bioerror_relse
(
struct
xfs_buf
*
);
/*
* Needed by xfs_rw.c
*/
int
xfs_rwlock
(
bhv_desc_t
*
bdp
,
vrwlock_t
write_lock
);
void
xfs_rwunlock
(
bhv_desc_t
*
bdp
,
vrwlock_t
write_lock
);
xfs_bioerror_relse
(
struct
xfs_buf
*
b
);
int
xfs_read_buf
(
...
...
@@ -188,4 +173,35 @@ xfs_ioerror_alert(
xfs_buf_t
*
bp
,
xfs_daddr_t
blkno
);
/*
* Prototypes for functions in xfs_vnodeops.c.
*/
int
xfs_rwlock
(
bhv_desc_t
*
bdp
,
vrwlock_t
write_lock
);
void
xfs_rwunlock
(
bhv_desc_t
*
bdp
,
vrwlock_t
write_lock
);
int
xfs_change_file_space
(
bhv_desc_t
*
bdp
,
int
cmd
,
xfs_flock64_t
*
bf
,
xfs_off_t
offset
,
cred_t
*
credp
,
int
flags
);
int
xfs_set_dmattrs
(
bhv_desc_t
*
bdp
,
u_int
evmask
,
u_int16_t
state
,
cred_t
*
credp
);
#endif
/* __XFS_RW_H__ */
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