83 #define ATTR_RMTVALUE_MAPSIZE 1
88 const unsigned char *aname)
102 struct xfs_inode *
ip)
106 ip->i_d.di_anextents == 0))
117 struct xfs_inode *
ip,
119 unsigned char *
value,
132 memset((
char *)&args, 0,
sizeof(args));
166 const unsigned char *
name,
167 unsigned char *
value,
176 if (XFS_FORCED_SHUTDOWN(ip->i_mount))
194 struct xfs_inode *
ip,
199 struct xfs_mount *
mp = ip->i_mount;
208 mp->m_sb.sb_blocksize, local);
212 if (size > (mp->m_sb.sb_blocksize >> 1)) {
231 struct xfs_inode *
dp,
233 unsigned char *
value,
240 int error, err2, committed;
241 xfs_mount_t *
mp = dp->i_mount;
267 memset((
char *)&args, 0,
sizeof(args));
328 (dp->i_d.di_anextents == 0))) {
353 if (mp->m_flags & XFS_MOUNT_WSYNC) {
354 xfs_trans_set_sync(args.
trans);
365 return(error == 0 ? err2 : error);
416 if (mp->m_flags & XFS_MOUNT_WSYNC) {
417 xfs_trans_set_sync(args.
trans);
443 const unsigned char *
name,
444 unsigned char *
value,
453 if (XFS_FORCED_SHUTDOWN(dp->i_mount))
474 xfs_mount_t *
mp = dp->i_mount;
479 memset((
char *)&args, 0,
sizeof(args));
566 if (mp->m_flags & XFS_MOUNT_WSYNC) {
567 xfs_trans_set_sync(args.
trans);
593 const unsigned char *
name,
601 if (XFS_FORCED_SHUTDOWN(dp->i_mount))
622 xfs_inode_t *
dp = context->
dp;
626 if (XFS_FORCED_SHUTDOWN(dp->i_mount))
649 #define ATTR_ENTBASESIZE \
650 (((struct attrlist_ent *) 0)->a_name - (char *) 0)
651 #define ATTR_ENTSIZE(namelen) \
652 ((ATTR_ENTBASESIZE + (namelen) + 1 + sizeof(u_int32_t)-1) \
653 & ~(sizeof(u_int32_t)-1))
668 unsigned char *
value)
690 arraytop =
sizeof(*alist) +
693 if (context->
firstu < arraytop) {
694 trace_xfs_attr_list_full(context);
701 aep->a_valuelen = valuelen;
702 memcpy(aep->a_name, name, namelen);
706 trace_xfs_attr_list_add(context);
741 if (((
long)buffer) & (
sizeof(
int)-1))
749 memset(&context, 0,
sizeof(context));
755 context.
bufsize = (bufsize & ~(
sizeof(
int)-1));
777 ASSERT(! XFS_NOT_DQATTACHED(mp, dp));
852 int newsize, forkoff,
retval;
854 trace_xfs_attr_sf_addname(args);
859 }
else if (retval ==
EEXIST) {
899 trace_xfs_attr_leaf_addname(args);
920 }
else if (retval ==
EEXIST) {
926 trace_xfs_attr_leaf_replace(args);
1094 int error, committed, forkoff;
1096 trace_xfs_attr_leaf_removename(args);
1188 context->
cursor->blkno = 0;
1196 context->
dp->i_mount, leaf);
1230 trace_xfs_attr_node_addname(args);
1255 }
else if (retval ==
EEXIST) {
1259 trace_xfs_attr_node_replace(args);
1492 trace_xfs_attr_node_removename(args);
1500 state->
mp = dp->i_mount;
1508 if (error || (retval !=
EEXIST)) {
1660 path = &state->
path;
1662 for (blk = path->
blk, level = 0; level < path->
active; blk++, level++) {
1677 for (blk = path->
blk, level = 0; level < path->
active; blk++, level++) {
1706 path = &state->
path;
1708 for (blk = path->
blk, level = 0; level < path->
active; blk++, level++) {
1727 for (blk = path->
blk, level = 0; level < path->
active; blk++, level++) {
1760 state->
mp = args->
dp->i_mount;
1770 }
else if (retval ==
EEXIST) {
1779 if (!retval && (args->
rmtblkno > 0)
1807 cursor = context->
cursor;
1816 if (cursor->
blkno > 0) {
1825 trace_xfs_attr_list_wrong_blk(context);
1833 trace_xfs_attr_list_wrong_blk(context);
1838 trace_xfs_attr_list_wrong_blk(context);
1844 trace_xfs_attr_list_wrong_blk(context);
1860 cursor->
blkno, -1, &bp,
1867 context->
dp->i_mount);
1871 if (node->
hdr.info.magic ==
1878 context->
dp->i_mount,
1883 btree = node->
btree;
1889 trace_xfs_attr_list_node_descend(context,
1914 context->
dp->i_mount, leaf);
1934 context->
dp->i_mount);
1959 int nmap,
error,
tmp, valuelen, blkcnt,
i;
1964 mp = args->
dp->i_mount;
1968 while (valuelen > 0) {
1977 for (i = 0; (i < nmap) && (valuelen > 0); i++) {
1982 error = xfs_trans_read_buf(mp,
NULL, mp->m_ddev_targp,
1983 dblkno, blkcnt, 0, &bp);
2015 int blkcnt, valuelen, nmap,
error,
tmp, committed;
2038 while (blkcnt > 0) {
2089 while (valuelen > 0) {
2109 bp = xfs_buf_get(mp->m_ddev_targp, dblkno, blkcnt, 0);
2114 tmp =
min_t(
int, valuelen, buflen);
2144 int valuelen, blkcnt, nmap,
error,
done, committed;
2146 mp = args->
dp->i_mount;
2154 while (valuelen > 0) {
2174 bp = xfs_incore(mp->m_ddev_targp, dblkno, blkcnt,
XBF_TRYLOCK);