#include "../ndni/data.h"
#include "../ndni/tlv-encoder.h"
#include "../vendor/uthash-handle.h"
#include "enum.h"
#include <fcntl.h>
#include <linux/stat.h>
#include <sys/stat.h>
Go to the source code of this file.
|
| typedef struct FileServerFd | FileServerFd |
| | File descriptor related information in the file server.
|
| typedef struct FileServer | FileServer |
◆ FileServerFd_StatTime
| #define FileServerFd_StatTime |
( |
| t | ) |
|
Value:((uint64_t)(t).tv_sec * SPDK_SEC_TO_NSEC + (uint64_t)(t).tv_nsec)
Convert timestamp to uint64_t nanoseconds.
- Parameters
-
| t | struct statx_timestamp or struct timespec. |
◆ FileServer
| typedef struct FileServer FileServer |
◆ FileServerFd
| typedef struct FileServerFd FileServerFd |
File descriptor related information in the file server.
◆ FileServerFd_Clear()
Close all file descriptors.
◆ FileServerFd_GenerateLs()
Populate directory listing.
- Parameters
-
| entry | a valid FileServerFd entry representing a directory. |
- Postcondition
entry->lsV[:entry->lsL] contains 32=ls payload.
-
entry->lastSeg and entry->meta FinalBlock reflects entry->lsL size.
◆ FileServerFd_Open()
Open file descriptor or increment reference count.
- Parameters
-
- Return values
-
| NULL | filename is invalid or does not match a mount. |
| FileServer_NotFound | file does not exist; do not Unref this value. |
◆ FileServerFd_PrepareMetadata_()
◆ FileServerFd_Unref()
Decrement file descriptor reference count.
◆ FileServerFd_WriteMetadata()
| void FileServerFd_WriteMetadata |
( |
FileServerFd * | entry, |
|
|
struct iovec * | iov, |
|
|
int | iovcnt ) |
Write metadata packet.
- Parameters
-
| entry | a valid FileServerFd entry. |
| iov | Content iov, must match the length from FileServerFd_PrepareMetadata . |
◆ FileServer_NotFound
Sentinel value to indicate file not found.