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

Commit 08e0e7c8 authored by David Howells's avatar David Howells Committed by David S. Miller
Browse files

[AF_RXRPC]: Make the in-kernel AFS filesystem use AF_RXRPC.



Make the in-kernel AFS filesystem use AF_RXRPC instead of the old RxRPC code.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 651350d1
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -2019,7 +2019,7 @@ config CODA_FS_OLD_API
config AFS_FS
	tristate "Andrew File System support (AFS) (EXPERIMENTAL)"
	depends on INET && EXPERIMENTAL
	select RXRPC
	select AF_RXRPC
	help
	  If you say Y here, you will get an experimental Andrew File System
	  driver. It currently only supports unsecured read-only AFS access.
@@ -2028,6 +2028,17 @@ config AFS_FS

	  If unsure, say N.

config AFS_DEBUG
	bool "AFS dynamic debugging"
	depends on AFS_FS
	help
	  Say Y here to make runtime controllable debugging messages appear.

	  See <file:Documentation/filesystems/afs.txt> for more information.

	  If unsure, say N.


config RXRPC
	tristate

+1 −2
Original line number Diff line number Diff line
@@ -10,12 +10,11 @@ kafs-objs := \
	file.o \
	fsclient.o \
	inode.o \
	kafsasyncd.o \
	kafstimod.o \
	main.o \
	misc.o \
	mntpt.o \
	proc.o \
	rxrpc.o \
	server.o \
	super.o \
	vlclient.o \
+9 −13
Original line number Diff line number Diff line
/* AFS types
/* AFS common types
 *
 * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
 * Copyright (C) 2002, 2007 Red Hat, Inc. All Rights Reserved.
 * Written by David Howells (dhowells@redhat.com)
 *
 * This program is free software; you can redistribute it and/or
@@ -9,10 +9,10 @@
 * 2 of the License, or (at your option) any later version.
 */

#ifndef AFS_TYPES_H
#define AFS_TYPES_H
#ifndef AFS_H
#define AFS_H

#include <rxrpc/types.h>
#include <linux/in.h>

typedef unsigned			afs_volid_t;
typedef unsigned			afs_vnodeid_t;
@@ -31,9 +31,6 @@ typedef enum {
	AFS_FTYPE_SYMLINK	= 3,
} afs_file_type_t;

struct afs_cell;
struct afs_vnode;

/*
 * AFS file identifier
 */
@@ -54,14 +51,13 @@ typedef enum {
} afs_callback_type_t;

struct afs_callback {
	struct afs_server	*server;	/* server that made the promise */
	struct afs_fid		fid;		/* file identifier */
	unsigned		version;	/* callback version */
	unsigned		expiry;		/* time at which expires */
	afs_callback_type_t	type;		/* type of callback */
};

#define AFSCBMAX 50
#define AFSCBMAX 50	/* maximum callbacks transferred per bulk op */

/*
 * AFS volume information
@@ -88,7 +84,7 @@ struct afs_file_status {
	afs_file_type_t		type;		/* file type */
	unsigned		nlink;		/* link count */
	size_t			size;		/* file size */
	afs_dataversion_t	version;	/* current data version */
	afs_dataversion_t	data_version;	/* current data version */
	unsigned		author;		/* author ID */
	unsigned		owner;		/* owner ID */
	unsigned		caller_access;	/* access rights for authenticated caller */
@@ -106,4 +102,4 @@ struct afs_volsync {
	time_t			creation;	/* volume creation time */
};

#endif /* AFS_TYPES_H */
#endif /* AFS_H */
+28 −0
Original line number Diff line number Diff line
/* mount parameters
/* AFS Cache Manager definitions
 *
 * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
 * Written by David Howells (dhowells@redhat.com)
 *
 * This program is free software; you can redistribute it and/or
@@ -9,15 +9,20 @@
 * 2 of the License, or (at your option) any later version.
 */

#ifndef AFS_MOUNT_H
#define AFS_MOUNT_H
#ifndef AFS_CM_H
#define AFS_CM_H

struct afs_mountdata {
	const char		*volume;	/* name of volume */
	const char		*cell;		/* name of cell containing volume */
	const char		*cache;		/* name of cache block device */
	size_t			nservers;	/* number of server addresses listed */
	uint32_t		servers[10];	/* IP addresses of servers in this cell */
#define AFS_CM_PORT		7001	/* AFS file server port */
#define CM_SERVICE		1	/* AFS File Service ID */

enum AFS_CM_Operations {
	CBCallBack		= 204,	/* break callback promises */
	CBInitCallBackState	= 205,	/* initialise callback state */
	CBProbe			= 206,	/* probe client */
	CBGetLock		= 207,	/* get contents of CM lock table */
	CBGetCE			= 208,	/* get cache file description */
	CBGetXStatsVersion	= 209,	/* get version of extended statistics */
	CBGetXStats		= 210,	/* get contents of extended statistics data */
};

#endif /* AFS_MOUNT_H */
#endif /* AFS_FS_H */
+18 −13
Original line number Diff line number Diff line
/* AFS abort/error codes
/* AFS File Service definitions
 *
 * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
 * Written by David Howells (dhowells@redhat.com)
 *
 * This program is free software; you can redistribute it and/or
@@ -9,15 +9,22 @@
 * 2 of the License, or (at your option) any later version.
 */

#ifndef AFS_ERRORS_H
#define AFS_ERRORS_H
#ifndef AFS_FS_H
#define AFS_FS_H

#include "types.h"
#define AFS_FS_PORT		7000	/* AFS file server port */
#define FS_SERVICE		1	/* AFS File Service ID */

/*
 * file server abort codes
 */
typedef enum {
enum AFS_FS_Operations {
	FSFETCHSTATUS		= 132,	/* AFS Fetch file status */
	FSFETCHDATA		= 130,	/* AFS Fetch file data */
	FSGIVEUPCALLBACKS	= 147,	/* AFS Discard callback promises */
	FSGETVOLUMEINFO		= 148,	/* AFS Get root volume information */
	FSGETROOTVOLUME		= 151,	/* AFS Get root volume name */
	FSLOOKUP		= 161	/* AFS lookup file in directory */
};

enum AFS_FS_Errors {
	VSALVAGE	= 101,	/* volume needs salvaging */
	VNOVNODE	= 102,	/* no such file/dir (vnode) */
	VNOVOL		= 103,	/* no such volume or volume unavailable */
@@ -29,8 +36,6 @@ typedef enum {
	VOVERQUOTA	= 109,	/* volume's maximum quota exceeded */
	VBUSY		= 110,	/* volume is temporarily unavailable */
	VMOVED		= 111,	/* volume moved to new server - ask this FS where */
} afs_rxfs_abort_t;

extern int afs_abort_to_error(int);
};

#endif /* AFS_ERRORS_H */
#endif /* AFS_FS_H */
Loading