pnfsblock: basic extent code

Adds structures and basic create/delete code for extents.

Signed-off-by: Fred Isaman <iisaman@citi.umich.edu>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Zhang Jingwang <Jingwang.Zhang@emc.com>
Signed-off-by: Benny Halevy <bhalevy@tonian.com>
Signed-off-by: Jim Rees <rees@umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Fred Isaman
2011-07-30 20:52:41 -04:00
committed by Trond Myklebust
parent e9643fe80d
commit 9e69296999
4 changed files with 107 additions and 5 deletions

View File

@@ -53,12 +53,24 @@ bl_write_pagelist(struct nfs_write_data *wdata,
return PNFS_NOT_ATTEMPTED;
}
/* STUB */
/* FIXME - range ignored */
static void
release_extents(struct pnfs_block_layout *bl,
struct pnfs_layout_range *range)
release_extents(struct pnfs_block_layout *bl, struct pnfs_layout_range *range)
{
return;
int i;
struct pnfs_block_extent *be;
spin_lock(&bl->bl_ext_lock);
for (i = 0; i < EXTENT_LISTS; i++) {
while (!list_empty(&bl->bl_extents[i])) {
be = list_first_entry(&bl->bl_extents[i],
struct pnfs_block_extent,
be_node);
list_del(&be->be_node);
bl_put_extent(be);
}
}
spin_unlock(&bl->bl_ext_lock);
}
/* STUB */