Commit a310082f authored by David Howells's avatar David Howells
Browse files

afs: Rename struct afs_fs_cursor to afs_operation



As a prelude to implementing asynchronous fileserver operations in the afs
filesystem, rename struct afs_fs_cursor to afs_operation.

This struct is going to form the core of the operation management and is
going to acquire more members in later.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent 7126ead9
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -643,7 +643,7 @@ static struct inode *afs_do_lookup(struct inode *dir, struct dentry *dentry,
	struct afs_super_info *as = dir->i_sb->s_fs_info;
	struct afs_status_cb *scb;
	struct afs_iget_data iget_data;
	struct afs_fs_cursor fc;
	struct afs_operation fc;
	struct afs_server *server;
	struct afs_vnode *dvnode = AFS_FS_I(dir), *vnode;
	struct inode *inode = NULL, *ti;
@@ -1220,7 +1220,7 @@ void afs_d_release(struct dentry *dentry)
/*
 * Create a new inode for create/mkdir/symlink
 */
static void afs_vnode_new_inode(struct afs_fs_cursor *fc,
static void afs_vnode_new_inode(struct afs_operation *fc,
				struct dentry *new_dentry,
				struct afs_iget_data *new_data,
				struct afs_status_cb *new_scb)
@@ -1248,7 +1248,7 @@ static void afs_vnode_new_inode(struct afs_fs_cursor *fc,
	d_instantiate(new_dentry, inode);
}

static void afs_prep_for_new_inode(struct afs_fs_cursor *fc,
static void afs_prep_for_new_inode(struct afs_operation *fc,
				   struct afs_iget_data *iget_data)
{
	iget_data->volume = fc->vnode->volume;
@@ -1261,7 +1261,7 @@ static void afs_prep_for_new_inode(struct afs_fs_cursor *fc,
 * number derived from the result of the operation.  It doesn't matter if
 * d_fsdata goes backwards as we'll just revalidate.
 */
static void afs_update_dentry_version(struct afs_fs_cursor *fc,
static void afs_update_dentry_version(struct afs_operation *fc,
				      struct dentry *dentry,
				      struct afs_status_cb *scb)
{
@@ -1277,7 +1277,7 @@ static int afs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{
	struct afs_iget_data iget_data;
	struct afs_status_cb *scb;
	struct afs_fs_cursor fc;
	struct afs_operation fc;
	struct afs_vnode *dvnode = AFS_FS_I(dir);
	struct key *key;
	afs_dataversion_t data_version;
@@ -1367,7 +1367,7 @@ static void afs_dir_remove_subdir(struct dentry *dentry)
static int afs_rmdir(struct inode *dir, struct dentry *dentry)
{
	struct afs_status_cb *scb;
	struct afs_fs_cursor fc;
	struct afs_operation fc;
	struct afs_vnode *dvnode = AFS_FS_I(dir), *vnode = NULL;
	struct key *key;
	afs_dataversion_t data_version;
@@ -1483,7 +1483,7 @@ static int afs_dir_remove_link(struct afs_vnode *dvnode, struct dentry *dentry,
 */
static int afs_unlink(struct inode *dir, struct dentry *dentry)
{
	struct afs_fs_cursor fc;
	struct afs_operation fc;
	struct afs_status_cb *scb;
	struct afs_vnode *dvnode = AFS_FS_I(dir);
	struct afs_vnode *vnode = AFS_FS_I(d_inode(dentry));
@@ -1588,7 +1588,7 @@ static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
		      bool excl)
{
	struct afs_iget_data iget_data;
	struct afs_fs_cursor fc;
	struct afs_operation fc;
	struct afs_status_cb *scb;
	struct afs_vnode *dvnode = AFS_FS_I(dir);
	struct key *key;
@@ -1666,7 +1666,7 @@ error:
static int afs_link(struct dentry *from, struct inode *dir,
		    struct dentry *dentry)
{
	struct afs_fs_cursor fc;
	struct afs_operation fc;
	struct afs_status_cb *scb;
	struct afs_vnode *dvnode = AFS_FS_I(dir);
	struct afs_vnode *vnode = AFS_FS_I(d_inode(from));
@@ -1755,7 +1755,7 @@ static int afs_symlink(struct inode *dir, struct dentry *dentry,
		       const char *content)
{
	struct afs_iget_data iget_data;
	struct afs_fs_cursor fc;
	struct afs_operation fc;
	struct afs_status_cb *scb;
	struct afs_vnode *dvnode = AFS_FS_I(dir);
	struct key *key;
@@ -1837,7 +1837,7 @@ static int afs_rename(struct inode *old_dir, struct dentry *old_dentry,
		      struct inode *new_dir, struct dentry *new_dentry,
		      unsigned int flags)
{
	struct afs_fs_cursor fc;
	struct afs_operation fc;
	struct afs_status_cb *scb;
	struct afs_vnode *orig_dvnode, *new_dvnode, *vnode;
	struct dentry *tmp = NULL, *rehash = NULL;
+2 −2
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ static int afs_do_silly_rename(struct afs_vnode *dvnode, struct afs_vnode *vnode
			       struct dentry *old, struct dentry *new,
			       struct key *key)
{
	struct afs_fs_cursor fc;
	struct afs_operation fc;
	struct afs_status_cb *scb;
	afs_dataversion_t dir_data_version;
	int ret = -ERESTARTSYS;
@@ -145,7 +145,7 @@ out:
static int afs_do_silly_unlink(struct afs_vnode *dvnode, struct afs_vnode *vnode,
			       struct dentry *dentry, struct key *key)
{
	struct afs_fs_cursor fc;
	struct afs_operation fc;
	struct afs_status_cb *scb;
	int ret = -ERESTARTSYS;

+1 −1
Original line number Diff line number Diff line
@@ -225,7 +225,7 @@ static void afs_file_readpage_read_complete(struct page *page,
 */
int afs_fetch_data(struct afs_vnode *vnode, struct key *key, struct afs_read *req)
{
	struct afs_fs_cursor fc;
	struct afs_operation fc;
	struct afs_status_cb *scb;
	int ret;

+3 −3
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ static int afs_set_lock(struct afs_vnode *vnode, struct key *key,
			afs_lock_type_t type)
{
	struct afs_status_cb *scb;
	struct afs_fs_cursor fc;
	struct afs_operation fc;
	int ret;

	_enter("%s{%llx:%llu.%u},%x,%u",
@@ -216,7 +216,7 @@ static int afs_set_lock(struct afs_vnode *vnode, struct key *key,
static int afs_extend_lock(struct afs_vnode *vnode, struct key *key)
{
	struct afs_status_cb *scb;
	struct afs_fs_cursor fc;
	struct afs_operation fc;
	int ret;

	_enter("%s{%llx:%llu.%u},%x",
@@ -253,7 +253,7 @@ static int afs_extend_lock(struct afs_vnode *vnode, struct key *key)
static int afs_release_lock(struct afs_vnode *vnode, struct key *key)
{
	struct afs_status_cb *scb;
	struct afs_fs_cursor fc;
	struct afs_operation fc;
	int ret;

	_enter("%s{%llx:%llu.%u},%x",
+21 −21
Original line number Diff line number Diff line
@@ -272,7 +272,7 @@ static const struct afs_call_type afs_RXFSFetchStatus_vnode = {
/*
 * fetch the status information for a file
 */
int afs_fs_fetch_file_status(struct afs_fs_cursor *fc, struct afs_status_cb *scb,
int afs_fs_fetch_file_status(struct afs_operation *fc, struct afs_status_cb *scb,
			     struct afs_volsync *volsync)
{
	struct afs_vnode *vnode = fc->vnode;
@@ -470,7 +470,7 @@ static const struct afs_call_type afs_RXFSFetchData64 = {
/*
 * fetch data from a very large file
 */
static int afs_fs_fetch_data64(struct afs_fs_cursor *fc,
static int afs_fs_fetch_data64(struct afs_operation *fc,
			       struct afs_status_cb *scb,
			       struct afs_read *req)
{
@@ -511,7 +511,7 @@ static int afs_fs_fetch_data64(struct afs_fs_cursor *fc,
/*
 * fetch data from a file
 */
int afs_fs_fetch_data(struct afs_fs_cursor *fc,
int afs_fs_fetch_data(struct afs_operation *fc,
		      struct afs_status_cb *scb,
		      struct afs_read *req)
{
@@ -599,7 +599,7 @@ static const struct afs_call_type afs_RXFSMakeDir = {
/*
 * create a file or make a directory
 */
int afs_fs_create(struct afs_fs_cursor *fc,
int afs_fs_create(struct afs_operation *fc,
		  const char *name,
		  umode_t mode,
		  struct afs_status_cb *dvnode_scb,
@@ -707,7 +707,7 @@ static const struct afs_call_type afs_RXFSRemoveDir = {
/*
 * remove a file or directory
 */
int afs_fs_remove(struct afs_fs_cursor *fc, struct afs_vnode *vnode,
int afs_fs_remove(struct afs_operation *fc, struct afs_vnode *vnode,
		  const char *name, bool isdir, struct afs_status_cb *dvnode_scb)
{
	struct afs_vnode *dvnode = fc->vnode;
@@ -792,7 +792,7 @@ static const struct afs_call_type afs_RXFSLink = {
/*
 * make a hard link
 */
int afs_fs_link(struct afs_fs_cursor *fc, struct afs_vnode *vnode,
int afs_fs_link(struct afs_operation *fc, struct afs_vnode *vnode,
		const char *name,
		struct afs_status_cb *dvnode_scb,
		struct afs_status_cb *vnode_scb)
@@ -882,7 +882,7 @@ static const struct afs_call_type afs_RXFSSymlink = {
/*
 * create a symbolic link
 */
int afs_fs_symlink(struct afs_fs_cursor *fc,
int afs_fs_symlink(struct afs_operation *fc,
		   const char *name,
		   const char *contents,
		   struct afs_status_cb *dvnode_scb,
@@ -990,7 +990,7 @@ static const struct afs_call_type afs_RXFSRename = {
/*
 * Rename/move a file or directory.
 */
int afs_fs_rename(struct afs_fs_cursor *fc,
int afs_fs_rename(struct afs_operation *fc,
		  const char *orig_name,
		  struct afs_vnode *new_dvnode,
		  const char *new_name,
@@ -1105,7 +1105,7 @@ static const struct afs_call_type afs_RXFSStoreData64 = {
/*
 * store a set of pages to a very large file
 */
static int afs_fs_store_data64(struct afs_fs_cursor *fc,
static int afs_fs_store_data64(struct afs_operation *fc,
			       struct address_space *mapping,
			       pgoff_t first, pgoff_t last,
			       unsigned offset, unsigned to,
@@ -1165,7 +1165,7 @@ static int afs_fs_store_data64(struct afs_fs_cursor *fc,
/*
 * store a set of pages
 */
int afs_fs_store_data(struct afs_fs_cursor *fc, struct address_space *mapping,
int afs_fs_store_data(struct afs_operation *fc, struct address_space *mapping,
		      pgoff_t first, pgoff_t last,
		      unsigned offset, unsigned to,
		      struct afs_status_cb *scb)
@@ -1291,7 +1291,7 @@ static const struct afs_call_type afs_RXFSStoreData64_as_Status = {
 * set the attributes on a very large file, using FS.StoreData rather than
 * FS.StoreStatus so as to alter the file size also
 */
static int afs_fs_setattr_size64(struct afs_fs_cursor *fc, struct iattr *attr,
static int afs_fs_setattr_size64(struct afs_operation *fc, struct iattr *attr,
				 struct afs_status_cb *scb)
{
	struct afs_vnode *vnode = fc->vnode;
@@ -1340,7 +1340,7 @@ static int afs_fs_setattr_size64(struct afs_fs_cursor *fc, struct iattr *attr,
 * set the attributes on a file, using FS.StoreData rather than FS.StoreStatus
 * so as to alter the file size also
 */
static int afs_fs_setattr_size(struct afs_fs_cursor *fc, struct iattr *attr,
static int afs_fs_setattr_size(struct afs_operation *fc, struct iattr *attr,
			       struct afs_status_cb *scb)
{
	struct afs_vnode *vnode = fc->vnode;
@@ -1388,7 +1388,7 @@ static int afs_fs_setattr_size(struct afs_fs_cursor *fc, struct iattr *attr,
 * set the attributes on a file, using FS.StoreData if there's a change in file
 * size, and FS.StoreStatus otherwise
 */
int afs_fs_setattr(struct afs_fs_cursor *fc, struct iattr *attr,
int afs_fs_setattr(struct afs_operation *fc, struct iattr *attr,
		   struct afs_status_cb *scb)
{
	struct afs_vnode *vnode = fc->vnode;
@@ -1569,7 +1569,7 @@ static const struct afs_call_type afs_RXFSGetVolumeStatus = {
/*
 * fetch the status of a volume
 */
int afs_fs_get_volume_status(struct afs_fs_cursor *fc,
int afs_fs_get_volume_status(struct afs_operation *fc,
			     struct afs_volume_status *vs)
{
	struct afs_vnode *vnode = fc->vnode;
@@ -1659,7 +1659,7 @@ static const struct afs_call_type afs_RXFSReleaseLock = {
/*
 * Set a lock on a file
 */
int afs_fs_set_lock(struct afs_fs_cursor *fc, afs_lock_type_t type,
int afs_fs_set_lock(struct afs_operation *fc, afs_lock_type_t type,
		    struct afs_status_cb *scb)
{
	struct afs_vnode *vnode = fc->vnode;
@@ -1698,7 +1698,7 @@ int afs_fs_set_lock(struct afs_fs_cursor *fc, afs_lock_type_t type,
/*
 * extend a lock on a file
 */
int afs_fs_extend_lock(struct afs_fs_cursor *fc, struct afs_status_cb *scb)
int afs_fs_extend_lock(struct afs_operation *fc, struct afs_status_cb *scb)
{
	struct afs_vnode *vnode = fc->vnode;
	struct afs_call *call;
@@ -1735,7 +1735,7 @@ int afs_fs_extend_lock(struct afs_fs_cursor *fc, struct afs_status_cb *scb)
/*
 * release a lock on a file
 */
int afs_fs_release_lock(struct afs_fs_cursor *fc, struct afs_status_cb *scb)
int afs_fs_release_lock(struct afs_operation *fc, struct afs_status_cb *scb)
{
	struct afs_vnode *vnode = fc->vnode;
	struct afs_call *call;
@@ -1941,7 +1941,7 @@ static const struct afs_call_type afs_RXFSFetchStatus = {
/*
 * Fetch the status information for a fid without needing a vnode handle.
 */
int afs_fs_fetch_status(struct afs_fs_cursor *fc,
int afs_fs_fetch_status(struct afs_operation *fc,
			struct afs_net *net,
			struct afs_fid *fid,
			struct afs_status_cb *scb,
@@ -2101,7 +2101,7 @@ static const struct afs_call_type afs_RXFSInlineBulkStatus = {
/*
 * Fetch the status information for up to 50 files
 */
int afs_fs_inline_bulk_status(struct afs_fs_cursor *fc,
int afs_fs_inline_bulk_status(struct afs_operation *fc,
			      struct afs_net *net,
			      struct afs_fid *fids,
			      struct afs_status_cb *statuses,
@@ -2234,7 +2234,7 @@ static const struct afs_call_type afs_RXFSFetchACL = {
/*
 * Fetch the ACL for a file.
 */
struct afs_acl *afs_fs_fetch_acl(struct afs_fs_cursor *fc,
struct afs_acl *afs_fs_fetch_acl(struct afs_operation *fc,
				 struct afs_status_cb *scb)
{
	struct afs_vnode *vnode = fc->vnode;
@@ -2303,7 +2303,7 @@ static const struct afs_call_type afs_RXFSStoreACL = {
/*
 * Fetch the ACL for a file.
 */
int afs_fs_store_acl(struct afs_fs_cursor *fc, const struct afs_acl *acl,
int afs_fs_store_acl(struct afs_operation *fc, const struct afs_acl *acl,
		     struct afs_status_cb *scb)
{
	struct afs_vnode *vnode = fc->vnode;
Loading