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
4a93d6e8
Commit
4a93d6e8
authored
Sep 15, 2003
by
Nathan Scott
Committed by
Stephen Lord
Sep 15, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] Alternate, cleaner fix for the ENOSPC/ACL lookup problem
SGI Modid: 2.5.x-xfs:slinx:157531a
parent
487d7c62
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
28 deletions
+40
-28
fs/xfs/Makefile
fs/xfs/Makefile
+0
-1
fs/xfs/xfs_attr.c
fs/xfs/xfs_attr.c
+39
-21
fs/xfs/xfs_da_btree.c
fs/xfs/xfs_da_btree.c
+1
-5
fs/xfs/xfs_da_btree.h
fs/xfs/xfs_da_btree.h
+0
-1
No files found.
fs/xfs/Makefile
View file @
4a93d6e8
...
...
@@ -65,7 +65,6 @@ xfs-$(CONFIG_SYSCTL) += linux/xfs_sysctl.o
xfs-y
+=
xfs_alloc.o
\
xfs_alloc_btree.o
\
xfs_attr.o
\
xfs_attr_fetch.o
\
xfs_attr_leaf.o
\
xfs_bit.o
\
xfs_bmap.o
\
...
...
fs/xfs/xfs_attr.c
View file @
4a93d6e8
...
...
@@ -116,38 +116,38 @@ ktrace_t *xfs_attr_trace_buf;
*========================================================================*/
/*ARGSUSED*/
int
/* error */
xfs_attr_get
(
bhv_desc_t
*
bd
p
,
char
*
name
,
char
*
value
,
int
*
valuelenp
,
int
flags
,
struct
cred
*
cred
)
STATIC
int
xfs_attr_get
_int
(
xfs_inode_t
*
i
p
,
char
*
name
,
char
*
value
,
int
*
valuelenp
,
int
flags
,
int
lock
,
struct
cred
*
cred
)
{
xfs_da_args_t
args
;
int
error
;
int
namelen
;
xfs_inode_t
*
ip
=
XFS_BHVTOI
(
bdp
);
if
(
!
name
)
return
EINVAL
;
ASSERT
(
MAXNAMELEN
-
1
<=
0xff
);
/* length is stored in uint8 */
namelen
=
strlen
(
name
);
if
(
namelen
>=
MAXNAMELEN
)
return
EFAULT
;
/* match IRIX behaviour */
return
(
EFAULT
)
;
/* match IRIX behaviour */
XFS_STATS_INC
(
xs_attr_get
);
if
(
XFS_IFORK_Q
(
ip
)
==
0
)
return
ENOATTR
;
if
(
XFS_FORCED_SHUTDOWN
(
ip
->
i_mount
))
return
(
EIO
);
return
(
EIO
);
if
((
XFS_IFORK_Q
(
ip
)
==
0
)
||
(
ip
->
i_d
.
di_aformat
==
XFS_DINODE_FMT_EXTENTS
&&
ip
->
i_d
.
di_anextents
==
0
))
return
(
ENOATTR
);
if
(
lock
)
{
xfs_ilock
(
ip
,
XFS_ILOCK_SHARED
);
/*
* Do we answer them, or ignore them?
*/
xfs_ilock
(
ip
,
XFS_ILOCK_SHARED
);
if
((
error
=
xfs_iaccess
(
XFS_BHVTOI
(
bdp
),
IREAD
,
cred
)))
{
if
((
error
=
xfs_iaccess
(
ip
,
IREAD
,
cred
)))
{
xfs_iunlock
(
ip
,
XFS_ILOCK_SHARED
);
return
(
XFS_ERROR
(
error
));
}
}
/*
* Fill in the arg structure for this request.
...
...
@@ -177,6 +177,8 @@ xfs_attr_get(bhv_desc_t *bdp, char *name, char *value, int *valuelenp,
}
else
{
error
=
xfs_attr_node_get
(
&
args
);
}
if
(
lock
)
xfs_iunlock
(
ip
,
XFS_ILOCK_SHARED
);
/*
...
...
@@ -189,6 +191,23 @@ xfs_attr_get(bhv_desc_t *bdp, char *name, char *value, int *valuelenp,
return
(
error
);
}
int
xfs_attr_fetch
(
xfs_inode_t
*
ip
,
char
*
name
,
char
*
value
,
int
valuelen
)
{
return
xfs_attr_get_int
(
ip
,
name
,
value
,
&
valuelen
,
ATTR_ROOT
,
0
,
NULL
);
}
int
xfs_attr_get
(
bhv_desc_t
*
bdp
,
char
*
name
,
char
*
value
,
int
*
valuelenp
,
int
flags
,
struct
cred
*
cred
)
{
xfs_inode_t
*
ip
=
XFS_BHVTOI
(
bdp
);
if
(
!
name
)
return
(
EINVAL
);
return
xfs_attr_get_int
(
ip
,
name
,
value
,
valuelenp
,
flags
,
1
,
cred
);
}
/*ARGSUSED*/
int
/* error */
xfs_attr_set
(
bhv_desc_t
*
bdp
,
char
*
name
,
char
*
value
,
int
valuelen
,
int
flags
,
...
...
@@ -1718,7 +1737,6 @@ xfs_attr_node_get(xfs_da_args_t *args)
int
i
;
state
=
xfs_da_state_alloc
();
state
->
holeok
=
1
;
state
->
args
=
args
;
state
->
mp
=
args
->
dp
->
i_mount
;
state
->
blocksize
=
state
->
mp
->
m_sb
.
sb_blocksize
;
...
...
fs/xfs/xfs_da_btree.c
View file @
4a93d6e8
...
...
@@ -1141,12 +1141,10 @@ xfs_da_node_lookup_int(xfs_da_state_t *state, int *result)
xfs_da_node_entry_t
*
btree
;
xfs_dablk_t
blkno
;
int
probe
,
span
,
max
,
error
,
retval
;
xfs_daddr_t
mappedbno
;
xfs_dahash_t
hashval
;
xfs_da_args_t
*
args
;
args
=
state
->
args
;
mappedbno
=
state
->
holeok
?
-
2
:
-
1
;
/*
* Descend thru the B-tree searching each level for the right
...
...
@@ -1164,9 +1162,7 @@ xfs_da_node_lookup_int(xfs_da_state_t *state, int *result)
*/
blk
->
blkno
=
blkno
;
error
=
xfs_da_read_buf
(
args
->
trans
,
args
->
dp
,
blkno
,
mappedbno
,
&
blk
->
bp
,
args
->
whichfork
);
if
(
!
error
&&
unlikely
(
state
->
holeok
&&
!
blk
->
bp
))
error
=
XFS_ERROR
(
ENOATTR
);
/* always attr here */
-
1
,
&
blk
->
bp
,
args
->
whichfork
);
if
(
error
)
{
blk
->
blkno
=
0
;
state
->
path
.
active
--
;
...
...
fs/xfs/xfs_da_btree.h
View file @
4a93d6e8
...
...
@@ -253,7 +253,6 @@ typedef struct xfs_da_state {
xfs_da_state_path_t
path
;
/* search/split paths */
xfs_da_state_path_t
altpath
;
/* alternate path for join */
unsigned
char
inleaf
;
/* insert into 1->lf, 0->splf */
unsigned
char
holeok
;
/* T/F: can deal with a hole */
unsigned
char
extravalid
;
/* T/F: extrablk is in use */
unsigned
char
extraafter
;
/* T/F: extrablk is after new */
xfs_da_state_blk_t
extrablk
;
/* for double-splits on leafs */
...
...
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