Skip to content

Commit

Permalink
afs: Rename struct afs_fs_cursor to afs_operation
Browse files Browse the repository at this point in the history
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: David Howells <dhowells@redhat.com>
  • Loading branch information
David Howells committed May 31, 2020
1 parent 7126ead commit a310082
Show file tree
Hide file tree
Showing 14 changed files with 278 additions and 278 deletions.
22 changes: 11 additions & 11 deletions fs/afs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand All @@ -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)
{
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -1666,7 +1666,7 @@ static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
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));
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions fs/afs/dir_silly.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -145,7 +145,7 @@ int afs_sillyrename(struct afs_vnode *dvnode, struct afs_vnode *vnode,
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;

Expand Down
2 changes: 1 addition & 1 deletion fs/afs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions fs/afs/flock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
42 changes: 21 additions & 21 deletions fs/afs/fsclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions fs/afs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static int afs_inode_init_from_status(struct afs_vnode *vnode, struct key *key,
/*
* Update the core inode struct from a returned status record.
*/
static void afs_apply_status(struct afs_fs_cursor *fc,
static void afs_apply_status(struct afs_operation *fc,
struct afs_vnode *vnode,
struct afs_status_cb *scb,
const afs_dataversion_t *expected_version)
Expand Down Expand Up @@ -243,7 +243,7 @@ static void afs_apply_status(struct afs_fs_cursor *fc,
/*
* Apply a callback to a vnode.
*/
static void afs_apply_callback(struct afs_fs_cursor *fc,
static void afs_apply_callback(struct afs_operation *fc,
struct afs_vnode *vnode,
struct afs_status_cb *scb,
unsigned int cb_break)
Expand All @@ -267,7 +267,7 @@ static void afs_apply_callback(struct afs_fs_cursor *fc,
* Apply the received status and callback to an inode all in the same critical
* section to avoid races with afs_validate().
*/
void afs_vnode_commit_status(struct afs_fs_cursor *fc,
void afs_vnode_commit_status(struct afs_operation *fc,
struct afs_vnode *vnode,
unsigned int cb_break,
const afs_dataversion_t *expected_version,
Expand Down Expand Up @@ -304,7 +304,7 @@ int afs_fetch_status(struct afs_vnode *vnode, struct key *key, bool is_new,
afs_access_t *_caller_access)
{
struct afs_status_cb *scb;
struct afs_fs_cursor fc;
struct afs_operation fc;
int ret;

_enter("%s,{%llx:%llu.%u,S=%lx}",
Expand Down Expand Up @@ -813,7 +813,7 @@ void afs_evict_inode(struct inode *inode)
*/
int afs_setattr(struct dentry *dentry, struct iattr *attr)
{
struct afs_fs_cursor fc;
struct afs_operation fc;
struct afs_status_cb *scb;
struct afs_vnode *vnode = AFS_FS_I(d_inode(dentry));
struct key *key;
Expand Down
Loading

0 comments on commit a310082

Please sign in to comment.