Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f768f9d3 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6

* 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6:
  [XFS] cleanup fid types mess
  [XFS] fixups after behavior removal merge into mainline git
parents 804b908a c6143911
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -54,8 +54,8 @@ xfs_fs_decode_fh(
		struct dentry	*de),
	void			*context)
{
	xfs_fid2_t		ifid;
	xfs_fid2_t		pfid;
	xfs_fid_t		ifid;
	xfs_fid_t		pfid;
	void			*parent = NULL;
	int			is64 = 0;
	__u32			*p = fh;
@@ -144,7 +144,7 @@ xfs_fs_get_dentry(
	struct dentry		*result;
	int			error;

	error = xfs_vget(XFS_M(sb), &vp, (fid_t *)data);
	error = xfs_vget(XFS_M(sb), &vp, data);
	if (error || vp == NULL)
		return ERR_PTR(-ESTALE) ;

+3 −3
Original line number Diff line number Diff line
@@ -71,13 +71,13 @@ xfs_fileid_length(int hasparent, int is64)

/*
 * Decode encoded inode information (either for the inode itself
 * or the parent) into an xfs_fid2_t structure.  Advances and
 * or the parent) into an xfs_fid_t structure.  Advances and
 * returns the new data pointer
 */
static inline __u32 *
xfs_fileid_decode_fid2(__u32 *p, xfs_fid2_t *fid, int is64)
xfs_fileid_decode_fid2(__u32 *p, xfs_fid_t *fid, int is64)
{
	fid->fid_len = sizeof(xfs_fid2_t) - sizeof(fid->fid_len);
	fid->fid_len = sizeof(xfs_fid_t) - sizeof(fid->fid_len);
	fid->fid_pad = 0;
	fid->fid_ino = *p++;
#if XFS_BIG_INUMS
+12 −12
Original line number Diff line number Diff line
@@ -152,11 +152,11 @@ xfs_find_handle(
		lock_mode = xfs_ilock_map_shared(ip);

		/* fill in fid section of handle from inode */
		handle.ha_fid.xfs_fid_len = sizeof(xfs_fid_t) -
					    sizeof(handle.ha_fid.xfs_fid_len);
		handle.ha_fid.xfs_fid_pad = 0;
		handle.ha_fid.xfs_fid_gen = ip->i_d.di_gen;
		handle.ha_fid.xfs_fid_ino = ip->i_ino;
		handle.ha_fid.fid_len = sizeof(xfs_fid_t) -
					sizeof(handle.ha_fid.fid_len);
		handle.ha_fid.fid_pad = 0;
		handle.ha_fid.fid_gen = ip->i_d.di_gen;
		handle.ha_fid.fid_ino = ip->i_ino;

		xfs_iunlock_map_shared(ip, lock_mode);

@@ -222,10 +222,10 @@ xfs_vget_fsop_handlereq(
	if (hlen < sizeof(*handlep))
		memset(((char *)handlep) + hlen, 0, sizeof(*handlep) - hlen);
	if (hlen > sizeof(handlep->ha_fsid)) {
		if (handlep->ha_fid.xfs_fid_len !=
				(hlen - sizeof(handlep->ha_fsid)
					- sizeof(handlep->ha_fid.xfs_fid_len))
		    || handlep->ha_fid.xfs_fid_pad)
		if (handlep->ha_fid.fid_len !=
		    (hlen - sizeof(handlep->ha_fsid) -
		            sizeof(handlep->ha_fid.fid_len)) ||
		    handlep->ha_fid.fid_pad)
			return XFS_ERROR(EINVAL);
	}

@@ -233,9 +233,9 @@ xfs_vget_fsop_handlereq(
	 * Crack the handle, obtain the inode # & generation #
	 */
	xfid = (struct xfs_fid *)&handlep->ha_fid;
	if (xfid->xfs_fid_len == sizeof(*xfid) - sizeof(xfid->xfs_fid_len)) {
		ino  = xfid->xfs_fid_ino;
		igen = xfid->xfs_fid_gen;
	if (xfid->fid_len == sizeof(*xfid) - sizeof(xfid->fid_len)) {
		ino  = xfid->fid_ino;
		igen = xfid->fid_gen;
	} else {
		return XFS_ERROR(EINVAL);
	}
+4 −17
Original line number Diff line number Diff line
@@ -41,29 +41,16 @@ int
xfs_dmops_get(struct xfs_mount *mp, struct xfs_mount_args *args)
{
	if (args->flags & XFSMNT_DMAPI) {
		struct xfs_dmops *ops;

		ops = symbol_get(xfs_dmcore_xfs);
		if (!ops) {
			request_module("xfs_dmapi");
			ops = symbol_get(xfs_dmcore_xfs);
		}

		if (!ops) {
			cmn_err(CE_WARN, "XFS: no dmapi support available.");
		cmn_err(CE_WARN,
			"XFS: dmapi support not available in this kernel.");
		return EINVAL;
	}
		mp->m_dm_ops = ops;
	} else {
		mp->m_dm_ops = &xfs_dmcore_stub;
	}

	mp->m_dm_ops = &xfs_dmcore_stub;
	return 0;
}

void
xfs_dmops_put(struct xfs_mount *mp)
{
	if (mp->m_dm_ops != &xfs_dmcore_stub)
		symbol_put(xfs_dmcore_xfs);
}
+6 −23
Original line number Diff line number Diff line
@@ -389,29 +389,12 @@ typedef struct xfs_fsop_attrmulti_handlereq {
 */
typedef struct { __u32 val[2]; } xfs_fsid_t; /* file system id type */


#ifndef HAVE_FID
#define MAXFIDSZ	46

typedef struct fid {
	__u16		fid_len;		/* length of data in bytes */
	unsigned char	fid_data[MAXFIDSZ];	/* data (fid_len worth)  */
} fid_t;
#endif

typedef struct xfs_fid {
	__u16	xfs_fid_len;		/* length of remainder	*/
	__u16	xfs_fid_pad;
	__u32	xfs_fid_gen;		/* generation number	*/
	__u64	xfs_fid_ino;		/* 64 bits inode number */
} xfs_fid_t;

typedef struct xfs_fid2 {
	__u16	fid_len;		/* length of remainder	*/
	__u16	fid_pad;	/* padding, must be zero */
	__u16	fid_pad;
	__u32	fid_gen;		/* generation number	*/
	__u64	fid_ino;	/* inode number */
} xfs_fid2_t;
	__u64	fid_ino;		/* 64 bits inode number */
} xfs_fid_t;

typedef struct xfs_handle {
	union {
@@ -422,9 +405,9 @@ typedef struct xfs_handle {
} xfs_handle_t;
#define ha_fsid ha_u._ha_fsid

#define XFS_HSIZE(handle)	(((char *) &(handle).ha_fid.xfs_fid_pad	 \
#define XFS_HSIZE(handle)	(((char *) &(handle).ha_fid.fid_pad	 \
				 - (char *) &(handle))			  \
				 + (handle).ha_fid.xfs_fid_len)
				 + (handle).ha_fid.fid_len)

/*
 * Flags for going down operation
Loading