Mercurial > nomad
changeset 600:9ffce7eb3c0a
common: add inode number to struct ndirent
This will prevent the fscall consumers from having to invoke a GETATTR just
to get the inode number.
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Sat, 23 Mar 2019 12:37:20 -0400 |
parents | daca430a9099 |
children | 5970f94b4333 |
files | src/common/dirent.c src/common/include/nomad/types.h |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/common/dirent.c Sat Mar 16 18:59:50 2019 -0400 +++ b/src/common/dirent.c Sat Mar 23 12:37:20 2019 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Josef 'Jeff' Sipek <jeffpc@josefsipek.net> + * Copyright (c) 2018-2019 Josef 'Jeff' Sipek <jeffpc@josefsipek.net> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -33,6 +33,8 @@ return FALSE; if (!xdr_uint64_t(xdrs, &ent->entry_size)) return FALSE; + if (!xdr_uint64_t(xdrs, &ent->ino)) + return FALSE; if (!xdr_string(xdrs, (char **) &ent->name, (1ul << (8 * sizeof(ent->namelen))) - 1)) return FALSE;
--- a/src/common/include/nomad/types.h Sat Mar 16 18:59:50 2019 -0400 +++ b/src/common/include/nomad/types.h Sat Mar 23 12:37:20 2019 -0400 @@ -55,6 +55,7 @@ struct ndirent { struct noid oid; uint64_t entry_size; + uint64_t ino; const char *name; uint8_t namelen; uint8_t type; /* see NDIRENT_TYPE_* macros in attr.h */