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
6a63ef06
Commit
6a63ef06
authored
Apr 13, 2015
by
Dave Chinner
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'xfs-misc-fixes-for-4.1-3' into for-next
Conflicts: fs/xfs/xfs_iops.c
parents
a448f8f1
21c3ea18
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
159 additions
and
51 deletions
+159
-51
fs/xfs/libxfs/xfs_attr_leaf.c
fs/xfs/libxfs/xfs_attr_leaf.c
+114
-36
fs/xfs/libxfs/xfs_attr_leaf.h
fs/xfs/libxfs/xfs_attr_leaf.h
+4
-2
fs/xfs/libxfs/xfs_da_format.h
fs/xfs/libxfs/xfs_da_format.h
+13
-1
fs/xfs/xfs_attr_inactive.c
fs/xfs/xfs_attr_inactive.c
+2
-1
fs/xfs/xfs_attr_list.c
fs/xfs/xfs_attr_list.c
+6
-3
fs/xfs/xfs_bmap_util.c
fs/xfs/xfs_bmap_util.c
+1
-1
fs/xfs/xfs_file.c
fs/xfs/xfs_file.c
+2
-2
fs/xfs/xfs_ioctl.c
fs/xfs/xfs_ioctl.c
+1
-1
fs/xfs/xfs_iops.c
fs/xfs/xfs_iops.c
+1
-1
fs/xfs/xfs_pnfs.c
fs/xfs/xfs_pnfs.c
+6
-1
fs/xfs/xfs_pnfs.h
fs/xfs/xfs_pnfs.h
+3
-2
fs/xfs/xfs_super.c
fs/xfs/xfs_super.c
+6
-0
No files found.
fs/xfs/libxfs/xfs_attr_leaf.c
View file @
6a63ef06
This diff is collapsed.
Click to expand it.
fs/xfs/libxfs/xfs_attr_leaf.h
View file @
6a63ef06
...
...
@@ -100,9 +100,11 @@ int xfs_attr_leaf_newentsize(struct xfs_da_args *args, int *local);
int
xfs_attr3_leaf_read
(
struct
xfs_trans
*
tp
,
struct
xfs_inode
*
dp
,
xfs_dablk_t
bno
,
xfs_daddr_t
mappedbno
,
struct
xfs_buf
**
bpp
);
void
xfs_attr3_leaf_hdr_from_disk
(
struct
xfs_attr3_icleaf_hdr
*
to
,
void
xfs_attr3_leaf_hdr_from_disk
(
struct
xfs_da_geometry
*
geo
,
struct
xfs_attr3_icleaf_hdr
*
to
,
struct
xfs_attr_leafblock
*
from
);
void
xfs_attr3_leaf_hdr_to_disk
(
struct
xfs_attr_leafblock
*
to
,
void
xfs_attr3_leaf_hdr_to_disk
(
struct
xfs_da_geometry
*
geo
,
struct
xfs_attr_leafblock
*
to
,
struct
xfs_attr3_icleaf_hdr
*
from
);
#endif
/* __XFS_ATTR_LEAF_H__ */
fs/xfs/libxfs/xfs_da_format.h
View file @
6a63ef06
...
...
@@ -725,7 +725,13 @@ struct xfs_attr3_icleaf_hdr {
__uint16_t
magic
;
__uint16_t
count
;
__uint16_t
usedbytes
;
__uint16_t
firstused
;
/*
* firstused is 32-bit here instead of 16-bit like the on-disk variant
* to support maximum fsb size of 64k without overflow issues throughout
* the attr code. Instead, the overflow condition is handled on
* conversion to/from disk.
*/
__uint32_t
firstused
;
__u8
holes
;
struct
{
__uint16_t
base
;
...
...
@@ -733,6 +739,12 @@ struct xfs_attr3_icleaf_hdr {
}
freemap
[
XFS_ATTR_LEAF_MAPSIZE
];
};
/*
* Special value to represent fs block size in the leaf header firstused field.
* Only used when block size overflows the 2-bytes available on disk.
*/
#define XFS_ATTR3_LEAF_NULLOFF 0
/*
* Flags used in the leaf_entry[i].flags field.
* NOTE: the INCOMPLETE bit must not collide with the flags bits specified
...
...
fs/xfs/xfs_attr_inactive.c
View file @
6a63ef06
...
...
@@ -132,9 +132,10 @@ xfs_attr3_leaf_inactive(
int
size
;
int
tmp
;
int
i
;
struct
xfs_mount
*
mp
=
bp
->
b_target
->
bt_mount
;
leaf
=
bp
->
b_addr
;
xfs_attr3_leaf_hdr_from_disk
(
&
ichdr
,
leaf
);
xfs_attr3_leaf_hdr_from_disk
(
mp
->
m_attr_geo
,
&
ichdr
,
leaf
);
/*
* Count the number of "remote" value extents.
...
...
fs/xfs/xfs_attr_list.c
View file @
6a63ef06
...
...
@@ -225,6 +225,7 @@ xfs_attr_node_list(xfs_attr_list_context_t *context)
int
error
,
i
;
struct
xfs_buf
*
bp
;
struct
xfs_inode
*
dp
=
context
->
dp
;
struct
xfs_mount
*
mp
=
dp
->
i_mount
;
trace_xfs_attr_node_list
(
context
);
...
...
@@ -256,7 +257,8 @@ xfs_attr_node_list(xfs_attr_list_context_t *context)
case
XFS_ATTR_LEAF_MAGIC
:
case
XFS_ATTR3_LEAF_MAGIC
:
leaf
=
bp
->
b_addr
;
xfs_attr3_leaf_hdr_from_disk
(
&
leafhdr
,
leaf
);
xfs_attr3_leaf_hdr_from_disk
(
mp
->
m_attr_geo
,
&
leafhdr
,
leaf
);
entries
=
xfs_attr3_leaf_entryp
(
leaf
);
if
(
cursor
->
hashval
>
be32_to_cpu
(
entries
[
leafhdr
.
count
-
1
].
hashval
))
{
...
...
@@ -340,7 +342,7 @@ xfs_attr_node_list(xfs_attr_list_context_t *context)
xfs_trans_brelse
(
NULL
,
bp
);
return
error
;
}
xfs_attr3_leaf_hdr_from_disk
(
&
leafhdr
,
leaf
);
xfs_attr3_leaf_hdr_from_disk
(
mp
->
m_attr_geo
,
&
leafhdr
,
leaf
);
if
(
context
->
seen_enough
||
leafhdr
.
forw
==
0
)
break
;
cursor
->
blkno
=
leafhdr
.
forw
;
...
...
@@ -368,11 +370,12 @@ xfs_attr3_leaf_list_int(
struct
xfs_attr_leaf_entry
*
entry
;
int
retval
;
int
i
;
struct
xfs_mount
*
mp
=
context
->
dp
->
i_mount
;
trace_xfs_attr_list_leaf
(
context
);
leaf
=
bp
->
b_addr
;
xfs_attr3_leaf_hdr_from_disk
(
&
ichdr
,
leaf
);
xfs_attr3_leaf_hdr_from_disk
(
mp
->
m_attr_geo
,
&
ichdr
,
leaf
);
entries
=
xfs_attr3_leaf_entryp
(
leaf
);
cursor
=
context
->
cursor
;
...
...
fs/xfs/xfs_bmap_util.c
View file @
6a63ef06
...
...
@@ -1383,7 +1383,7 @@ xfs_zero_file_space(
* If we are shifting right, we will start with last extent inside file space
* and continue until we reach the block corresponding to offset.
*/
int
static
int
xfs_shift_file_space
(
struct
xfs_inode
*
ip
,
xfs_off_t
offset
,
...
...
fs/xfs/xfs_file.c
View file @
6a63ef06
...
...
@@ -559,7 +559,7 @@ xfs_file_aio_write_checks(
if
(
error
)
return
error
;
error
=
xfs_break_layouts
(
inode
,
iolock
);
error
=
xfs_break_layouts
(
inode
,
iolock
,
true
);
if
(
error
)
return
error
;
...
...
@@ -848,7 +848,7 @@ xfs_file_fallocate(
return
-
EOPNOTSUPP
;
xfs_ilock
(
ip
,
iolock
);
error
=
xfs_break_layouts
(
inode
,
&
iolock
);
error
=
xfs_break_layouts
(
inode
,
&
iolock
,
false
);
if
(
error
)
goto
out_unlock
;
...
...
fs/xfs/xfs_ioctl.c
View file @
6a63ef06
...
...
@@ -639,7 +639,7 @@ xfs_ioc_space(
return
error
;
xfs_ilock
(
ip
,
iolock
);
error
=
xfs_break_layouts
(
inode
,
&
iolock
);
error
=
xfs_break_layouts
(
inode
,
&
iolock
,
false
);
if
(
error
)
goto
out_unlock
;
...
...
fs/xfs/xfs_iops.c
View file @
6a63ef06
...
...
@@ -953,7 +953,7 @@ xfs_vn_setattr(
uint
iolock
=
XFS_IOLOCK_EXCL
;
xfs_ilock
(
ip
,
iolock
);
error
=
xfs_break_layouts
(
dentry
->
d_inode
,
&
iolock
);
error
=
xfs_break_layouts
(
dentry
->
d_inode
,
&
iolock
,
true
);
if
(
!
error
)
{
xfs_ilock
(
ip
,
XFS_MMAPLOCK_EXCL
);
iolock
|=
XFS_MMAPLOCK_EXCL
;
...
...
fs/xfs/xfs_pnfs.c
View file @
6a63ef06
...
...
@@ -31,7 +31,8 @@
int
xfs_break_layouts
(
struct
inode
*
inode
,
uint
*
iolock
)
uint
*
iolock
,
bool
with_imutex
)
{
struct
xfs_inode
*
ip
=
XFS_I
(
inode
);
int
error
;
...
...
@@ -40,8 +41,12 @@ xfs_break_layouts(
while
((
error
=
break_layout
(
inode
,
false
)
==
-
EWOULDBLOCK
))
{
xfs_iunlock
(
ip
,
*
iolock
);
if
(
with_imutex
&&
(
*
iolock
&
XFS_IOLOCK_EXCL
))
mutex_unlock
(
&
inode
->
i_mutex
);
error
=
break_layout
(
inode
,
true
);
*
iolock
=
XFS_IOLOCK_EXCL
;
if
(
with_imutex
)
mutex_lock
(
&
inode
->
i_mutex
);
xfs_ilock
(
ip
,
*
iolock
);
}
...
...
fs/xfs/xfs_pnfs.h
View file @
6a63ef06
...
...
@@ -8,9 +8,10 @@ int xfs_fs_map_blocks(struct inode *inode, loff_t offset, u64 length,
int
xfs_fs_commit_blocks
(
struct
inode
*
inode
,
struct
iomap
*
maps
,
int
nr_maps
,
struct
iattr
*
iattr
);
int
xfs_break_layouts
(
struct
inode
*
inode
,
uint
*
iolock
);
int
xfs_break_layouts
(
struct
inode
*
inode
,
uint
*
iolock
,
bool
with_imutex
);
#else
static
inline
int
xfs_break_layouts
(
struct
inode
*
inode
,
uint
*
iolock
)
static
inline
int
xfs_break_layouts
(
struct
inode
*
inode
,
uint
*
iolock
,
bool
with_imutex
)
{
return
0
;
}
...
...
fs/xfs/xfs_super.c
View file @
6a63ef06
...
...
@@ -1227,6 +1227,12 @@ xfs_fs_remount(
/* ro -> rw */
if
((
mp
->
m_flags
&
XFS_MOUNT_RDONLY
)
&&
!
(
*
flags
&
MS_RDONLY
))
{
if
(
mp
->
m_flags
&
XFS_MOUNT_NORECOVERY
)
{
xfs_warn
(
mp
,
"ro->rw transition prohibited on norecovery mount"
);
return
-
EINVAL
;
}
mp
->
m_flags
&=
~
XFS_MOUNT_RDONLY
;
/*
...
...
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