mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 06:32:08 +00:00
pnfs-obj: define per-inode private structure
allocate and deallocate per-inode private pnfs_layout_hdr in preparation for I/O implementation. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
This commit is contained in:
parent
636fb9c89d
commit
e51b841dd0
3 changed files with 46 additions and 0 deletions
|
@ -41,6 +41,32 @@
|
|||
#include "objlayout.h"
|
||||
|
||||
#define NFSDBG_FACILITY NFSDBG_PNFS_LD
|
||||
/*
|
||||
* Create a objlayout layout structure for the given inode and return it.
|
||||
*/
|
||||
struct pnfs_layout_hdr *
|
||||
objlayout_alloc_layout_hdr(struct inode *inode, gfp_t gfp_flags)
|
||||
{
|
||||
struct objlayout *objlay;
|
||||
|
||||
objlay = kzalloc(sizeof(struct objlayout), gfp_flags);
|
||||
dprintk("%s: Return %p\n", __func__, objlay);
|
||||
return &objlay->pnfs_layout;
|
||||
}
|
||||
|
||||
/*
|
||||
* Free an objlayout layout structure
|
||||
*/
|
||||
void
|
||||
objlayout_free_layout_hdr(struct pnfs_layout_hdr *lo)
|
||||
{
|
||||
struct objlayout *objlay = OBJLAYOUT(lo);
|
||||
|
||||
dprintk("%s: objlay %p\n", __func__, objlay);
|
||||
|
||||
kfree(objlay);
|
||||
}
|
||||
|
||||
/*
|
||||
* Unmarshall layout and store it in pnfslay.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue