Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190331
b: refs/heads/master
c: e1da022
h: refs/heads/master
i:
  190329: d8e90a6
  190327: 6f40a9e
v: v3
  • Loading branch information
Jens Axboe committed Apr 22, 2010
1 parent d8865b8 commit d19a3a3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0ed07ddb56d1348e5ce33f3b8de20d730351983a
refs/heads/master: e1da0222753a2322d76c97fc02396fb83143c7ac
2 changes: 2 additions & 0 deletions trunk/fs/afs/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/workqueue.h>
#include <linux/sched.h>
#include <linux/fscache.h>
#include <linux/backing-dev.h>

#include "afs.h"
#include "afs_vl.h"
Expand Down Expand Up @@ -313,6 +314,7 @@ struct afs_volume {
unsigned short rjservers; /* number of servers discarded due to -ENOMEDIUM */
struct afs_server *servers[8]; /* servers on which volume resides (ordered) */
struct rw_semaphore server_sem; /* lock for accessing current server */
struct backing_dev_info bdi;
};

/*
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/afs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ static int afs_fill_super(struct super_block *sb, void *data)
sb->s_magic = AFS_FS_MAGIC;
sb->s_op = &afs_super_ops;
sb->s_fs_info = as;
sb->s_bdi = &as->volume->bdi;

/* allocate the root inode and dentry */
fid.vid = as->volume->vid;
Expand Down
7 changes: 7 additions & 0 deletions trunk/fs/afs/volume.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ struct afs_volume *afs_volume_lookup(struct afs_mount_params *params)
volume->cell = params->cell;
volume->vid = vlocation->vldb.vid[params->type];

ret = bdi_setup_and_register(&volume->bdi, "afs", BDI_CAP_MAP_COPY);
if (ret)
goto error_bdi;

init_rwsem(&volume->server_sem);

/* look up all the applicable server records */
Expand Down Expand Up @@ -151,6 +155,8 @@ struct afs_volume *afs_volume_lookup(struct afs_mount_params *params)
return ERR_PTR(ret);

error_discard:
bdi_destroy(&volume->bdi);
error_bdi:
up_write(&params->cell->vl_sem);

for (loop = volume->nservers - 1; loop >= 0; loop--)
Expand Down Expand Up @@ -200,6 +206,7 @@ void afs_put_volume(struct afs_volume *volume)
for (loop = volume->nservers - 1; loop >= 0; loop--)
afs_put_server(volume->servers[loop]);

bdi_destroy(&volume->bdi);
kfree(volume);

_leave(" [destroyed]");
Expand Down

0 comments on commit d19a3a3

Please sign in to comment.