New upstream version 8.1.0

This commit is contained in:
geos_one
2025-08-10 01:34:16 +02:00
commit c891bb7105
4398 changed files with 838833 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
#ifdef BEEGFS_NVFS
#include "ReadLocalFileRDMAMsg.h"
const struct NetMessageOps ReadLocalFileRDMAMsg_Ops = {
.serializePayload = ReadLocalFileRDMAMsg_serializePayload,
.deserializePayload = _NetMessage_deserializeDummy,
.processIncoming = NetMessage_processIncoming,
.getSupportedHeaderFeatureFlagsMask = NetMessage_getSupportedHeaderFeatureFlagsMask,
};
void ReadLocalFileRDMAMsg_serializePayload(NetMessage* this, SerializeCtx* ctx)
{
ReadLocalFileRDMAMsg* thisCast = (ReadLocalFileRDMAMsg*)this;
// offset
Serialization_serializeInt64(ctx, thisCast->offset);
// count
Serialization_serializeInt64(ctx, thisCast->count);
// accessFlags
Serialization_serializeUInt(ctx, thisCast->accessFlags);
// fileHandleID
Serialization_serializeStrAlign4(ctx, thisCast->fileHandleIDLen, thisCast->fileHandleID);
// clientNumID
NumNodeID_serialize(ctx, &thisCast->clientNumID);
// pathInfo
PathInfo_serialize(ctx, thisCast->pathInfoPtr);
// targetID
Serialization_serializeUShort(ctx, thisCast->targetID);
// RDMA info
RdmaInfo_serialize(ctx, thisCast->rdmap);
}
#endif /* BEEGFS_NVFS */

View File

@@ -0,0 +1,71 @@
#ifndef READLOCALFILERDMAMSG_H_
#define READLOCALFILERDMAMSG_H_
#ifdef BEEGFS_NVFS
#include <common/net/message/NetMessage.h>
#include <common/storage/PathInfo.h>
#include <common/storage/RdmaInfo.h>
#include "ReadLocalFileV2Msg.h"
struct ReadLocalFileRDMAMsg;
typedef struct ReadLocalFileRDMAMsg ReadLocalFileRDMAMsg;
static inline void ReadLocalFileRDMAMsg_init(ReadLocalFileRDMAMsg* this);
static inline void ReadLocalFileRDMAMsg_initFromSession(ReadLocalFileRDMAMsg* this,
NumNodeID clientNumID, const char* fileHandleID, uint16_t targetID, PathInfo* pathInfoPtr,
unsigned accessFlags, int64_t offset, int64_t count, RdmaInfo *rdmap);
// virtual functions
extern void ReadLocalFileRDMAMsg_serializePayload(NetMessage* this, SerializeCtx* ctx);
struct ReadLocalFileRDMAMsg
{
NetMessage netMessage;
int64_t offset;
int64_t count;
unsigned accessFlags;
NumNodeID clientNumID;
const char* fileHandleID;
unsigned fileHandleIDLen;
PathInfo* pathInfoPtr;
uint16_t targetID;
RdmaInfo *rdmap;
};
extern const struct NetMessageOps ReadLocalFileRDMAMsg_Ops;
void ReadLocalFileRDMAMsg_init(ReadLocalFileRDMAMsg* this)
{
NetMessage_init(&this->netMessage, NETMSGTYPE_ReadLocalFileRDMA, &ReadLocalFileRDMAMsg_Ops);
}
/**
* @param sessionID just a reference, so do not free it as long as you use this object!
*/
void ReadLocalFileRDMAMsg_initFromSession(ReadLocalFileRDMAMsg* this,
NumNodeID clientNumID, const char* fileHandleID, uint16_t targetID, PathInfo* pathInfoPtr,
unsigned accessFlags, int64_t offset, int64_t count, RdmaInfo *rdmap)
{
ReadLocalFileRDMAMsg_init(this);
this->clientNumID = clientNumID;
this->fileHandleID = fileHandleID;
this->fileHandleIDLen = strlen(fileHandleID);
this->targetID = targetID;
this->pathInfoPtr = pathInfoPtr;
this->accessFlags = accessFlags;
this->offset = offset;
this->count = count;
this->rdmap = rdmap;
}
#endif /* BEEGFS_NVFS */
#endif /*READLOCALFILERDMAMSG_H_*/

View File

@@ -0,0 +1,35 @@
#include "ReadLocalFileV2Msg.h"
const struct NetMessageOps ReadLocalFileV2Msg_Ops = {
.serializePayload = ReadLocalFileV2Msg_serializePayload,
.deserializePayload = _NetMessage_deserializeDummy,
.processIncoming = NetMessage_processIncoming,
.getSupportedHeaderFeatureFlagsMask = NetMessage_getSupportedHeaderFeatureFlagsMask,
};
void ReadLocalFileV2Msg_serializePayload(NetMessage* this, SerializeCtx* ctx)
{
ReadLocalFileV2Msg* thisCast = (ReadLocalFileV2Msg*)this;
// offset
Serialization_serializeInt64(ctx, thisCast->offset);
// count
Serialization_serializeInt64(ctx, thisCast->count);
// accessFlags
Serialization_serializeUInt(ctx, thisCast->accessFlags);
// fileHandleID
Serialization_serializeStrAlign4(ctx, thisCast->fileHandleIDLen, thisCast->fileHandleID);
// clientNumID
NumNodeID_serialize(ctx, &thisCast->clientNumID);
// pathInfo
PathInfo_serialize(ctx, thisCast->pathInfoPtr);
// targetID
Serialization_serializeUShort(ctx, thisCast->targetID);
}

View File

@@ -0,0 +1,71 @@
#ifndef READLOCALFILEV2MSG_H_
#define READLOCALFILEV2MSG_H_
#include <common/net/message/NetMessage.h>
#include <common/storage/PathInfo.h>
#define READLOCALFILEMSG_FLAG_SESSION_CHECK 1 /* if session check infos should be done */
#define READLOCALFILEMSG_FLAG_DISABLE_IO 2 /* disable read syscall for net bench */
#define READLOCALFILEMSG_FLAG_BUDDYMIRROR 4 /* given targetID is a buddymirrorgroup ID */
#define READLOCALFILEMSG_FLAG_BUDDYMIRROR_SECOND 8 /* secondary of group, otherwise primary */
struct ReadLocalFileV2Msg;
typedef struct ReadLocalFileV2Msg ReadLocalFileV2Msg;
static inline void ReadLocalFileV2Msg_init(ReadLocalFileV2Msg* this);
static inline void ReadLocalFileV2Msg_initFromSession(ReadLocalFileV2Msg* this,
NumNodeID clientNumID, const char* fileHandleID, uint16_t targetID, PathInfo* pathInfoPtr,
unsigned accessFlags, int64_t offset, int64_t count);
// virtual functions
extern void ReadLocalFileV2Msg_serializePayload(NetMessage* this, SerializeCtx* ctx);
struct ReadLocalFileV2Msg
{
NetMessage netMessage;
int64_t offset;
int64_t count;
unsigned accessFlags;
NumNodeID clientNumID;
const char* fileHandleID;
unsigned fileHandleIDLen;
PathInfo* pathInfoPtr;
uint16_t targetID;
};
extern const struct NetMessageOps ReadLocalFileV2Msg_Ops;
void ReadLocalFileV2Msg_init(ReadLocalFileV2Msg* this)
{
NetMessage_init(&this->netMessage, NETMSGTYPE_ReadLocalFileV2, &ReadLocalFileV2Msg_Ops);
}
/**
* @param sessionID just a reference, so do not free it as long as you use this object!
*/
void ReadLocalFileV2Msg_initFromSession(ReadLocalFileV2Msg* this,
NumNodeID clientNumID, const char* fileHandleID, uint16_t targetID, PathInfo* pathInfoPtr,
unsigned accessFlags, int64_t offset, int64_t count)
{
ReadLocalFileV2Msg_init(this);
this->clientNumID = clientNumID;
this->fileHandleID = fileHandleID;
this->fileHandleIDLen = strlen(fileHandleID);
this->targetID = targetID;
this->pathInfoPtr = pathInfoPtr;
this->accessFlags = accessFlags;
this->offset = offset;
this->count = count;
}
#endif /*READLOCALFILEV2MSG_H_*/

View File

@@ -0,0 +1,44 @@
#include "WriteLocalFileMsg.h"
const struct NetMessageOps WriteLocalFileMsg_Ops = {
.serializePayload = WriteLocalFileMsg_serializePayload,
.deserializePayload = _NetMessage_deserializeDummy,
.processIncoming = NetMessage_processIncoming,
.getSupportedHeaderFeatureFlagsMask = NetMessage_getSupportedHeaderFeatureFlagsMask,
};
void WriteLocalFileMsg_serializePayload(NetMessage* this, SerializeCtx* ctx)
{
WriteLocalFileMsg* thisCast = (WriteLocalFileMsg*)this;
// offset
Serialization_serializeInt64(ctx, thisCast->offset);
// count
Serialization_serializeInt64(ctx, thisCast->count);
// accessFlags
Serialization_serializeUInt(ctx, thisCast->accessFlags);
if(NetMessage_isMsgHeaderFeatureFlagSet(this, WRITELOCALFILEMSG_FLAG_USE_QUOTA))
{
// userID
Serialization_serializeUInt(ctx, thisCast->userID);
// groupID
Serialization_serializeUInt(ctx, thisCast->groupID);
}
// fileHandleID
Serialization_serializeStrAlign4(ctx, thisCast->fileHandleIDLen, thisCast->fileHandleID);
// clientNumID
NumNodeID_serialize(ctx, &thisCast->clientNumID);
// pathInfo
PathInfo_serialize(ctx, thisCast->pathInfo);
// targetID
Serialization_serializeUShort(ctx, thisCast->targetID);
}

View File

@@ -0,0 +1,99 @@
#ifndef WRITELOCALFILEMSG_H_
#define WRITELOCALFILEMSG_H_
#include <common/net/message/NetMessage.h>
#include <common/storage/StorageErrors.h>
#include <common/storage/PathInfo.h>
#include <app/log/Logger.h>
#include <app/App.h>
#include <os/iov_iter.h>
#define WRITELOCALFILEMSG_FLAG_SESSION_CHECK 1 /* if session check should be done */
#define WRITELOCALFILEMSG_FLAG_USE_QUOTA 2 /* if msg contains quota info */
#define WRITELOCALFILEMSG_FLAG_DISABLE_IO 4 /* disable write syscall for net bench mode */
#define WRITELOCALFILEMSG_FLAG_BUDDYMIRROR 8 /* given targetID is a buddymirrorgroup ID */
#define WRITELOCALFILEMSG_FLAG_BUDDYMIRROR_SECOND 16 /* secondary of group, otherwise primary */
#define WRITELOCALFILEMSG_FLAG_BUDDYMIRROR_FORWARD 32 /* forward msg to secondary */
struct WriteLocalFileMsg;
typedef struct WriteLocalFileMsg WriteLocalFileMsg;
static inline void WriteLocalFileMsg_init(WriteLocalFileMsg* this);
static inline void WriteLocalFileMsg_initFromSession(WriteLocalFileMsg* this,
NumNodeID clientNumID, const char* fileHandleID, uint16_t targetID, PathInfo* pathInfo,
unsigned accessFlags, int64_t offset, int64_t count);
// virtual functions
extern void WriteLocalFileMsg_serializePayload(NetMessage* this, SerializeCtx* ctx);
// getters & setters
static inline void WriteLocalFileMsg_setUserdataForQuota(WriteLocalFileMsg* this, unsigned userID,
unsigned groupID);
/**
* Note: This message supports only serialization, deserialization is not implemented.
*/
struct WriteLocalFileMsg
{
NetMessage netMessage;
int64_t offset;
int64_t count;
unsigned accessFlags;
NumNodeID clientNumID;
const char* fileHandleID;
unsigned fileHandleIDLen;
uint16_t targetID;
PathInfo* pathInfo;
unsigned userID;
unsigned groupID;
};
extern const struct NetMessageOps WriteLocalFileMsg_Ops;
void WriteLocalFileMsg_init(WriteLocalFileMsg* this)
{
NetMessage_init(&this->netMessage, NETMSGTYPE_WriteLocalFile, &WriteLocalFileMsg_Ops);
}
/**
* @param fileHandleID just a reference, so do not free it as long as you use this object!
* @param pathInfo just a reference, so do not free it as long as you use this object!
*/
void WriteLocalFileMsg_initFromSession(WriteLocalFileMsg* this,
NumNodeID clientNumID, const char* fileHandleID, uint16_t targetID, PathInfo* pathInfo,
unsigned accessFlags,
int64_t offset, int64_t count)
{
WriteLocalFileMsg_init(this);
this->clientNumID = clientNumID;
this->fileHandleID = fileHandleID;
this->fileHandleIDLen = strlen(fileHandleID);
this->targetID = targetID;
this->pathInfo = pathInfo;
this->accessFlags = accessFlags;
this->offset = offset;
this->count = count;
}
void WriteLocalFileMsg_setUserdataForQuota(WriteLocalFileMsg* this, unsigned userID,
unsigned groupID)
{
NetMessage* thisCast = (NetMessage*) this;
NetMessage_addMsgHeaderFeatureFlag(thisCast, WRITELOCALFILEMSG_FLAG_USE_QUOTA);
this->userID = userID;
this->groupID = groupID;
}
#endif /*WRITELOCALFILEMSG_H_*/

View File

@@ -0,0 +1,49 @@
#ifdef BEEGFS_NVFS
#include "WriteLocalFileRDMAMsg.h"
#include "WriteLocalFileMsg.h"
const struct NetMessageOps WriteLocalFileRDMAMsg_Ops = {
.serializePayload = WriteLocalFileRDMAMsg_serializePayload,
.deserializePayload = _NetMessage_deserializeDummy,
.processIncoming = NetMessage_processIncoming,
.getSupportedHeaderFeatureFlagsMask = NetMessage_getSupportedHeaderFeatureFlagsMask,
};
void WriteLocalFileRDMAMsg_serializePayload(NetMessage* this, SerializeCtx* ctx)
{
WriteLocalFileRDMAMsg* thisCast = (WriteLocalFileRDMAMsg*)this;
// offset
Serialization_serializeInt64(ctx, thisCast->offset);
// count
Serialization_serializeInt64(ctx, thisCast->count);
// accessFlags
Serialization_serializeUInt(ctx, thisCast->accessFlags);
if(NetMessage_isMsgHeaderFeatureFlagSet(this, WRITELOCALFILEMSG_FLAG_USE_QUOTA))
{
// userID
Serialization_serializeUInt(ctx, thisCast->userID);
// groupID
Serialization_serializeUInt(ctx, thisCast->groupID);
}
// fileHandleID
Serialization_serializeStrAlign4(ctx, thisCast->fileHandleIDLen, thisCast->fileHandleID);
// clientNumID
NumNodeID_serialize(ctx, &thisCast->clientNumID);
// pathInfo
PathInfo_serialize(ctx, thisCast->pathInfo);
// targetID
Serialization_serializeUShort(ctx, thisCast->targetID);
// RDMA info
RdmaInfo_serialize(ctx, thisCast->rdmap);
}
#endif /* BEEGFS_NVFS */

View File

@@ -0,0 +1,104 @@
#ifndef WRITELOCALFILERDMAMSG_H_
#define WRITELOCALFILERDMAMSG_H_
#ifdef BEEGFS_NVFS
#include <common/net/message/NetMessage.h>
#include <common/storage/StorageErrors.h>
#include <common/storage/PathInfo.h>
#include <common/storage/RdmaInfo.h>
#include <app/log/Logger.h>
#include <app/App.h>
#include <os/iov_iter.h>
#define WRITELOCALFILERDMAMSG_FLAG_SESSION_CHECK 1 /* if session check should be done */
#define WRITELOCALFILERDMAMSG_FLAG_USE_QUOTA 2 /* if msg contains quota info */
#define WRITELOCALFILERDMAMSG_FLAG_DISABLE_IO 4 /* disable write syscall for net bench mode */
#define WRITELOCALFILERDMAMSG_FLAG_BUDDYMIRROR 8 /* given targetID is a buddymirrorgroup ID */
#define WRITELOCALFILERDMAMSG_FLAG_BUDDYMIRROR_SECOND 16 /* secondary of group, otherwise primary */
#define WRITELOCALFILERDMAMSG_FLAG_BUDDYMIRROR_FORWARD 32 /* forward msg to secondary */
struct WriteLocalFileRDMAMsg;
typedef struct WriteLocalFileRDMAMsg WriteLocalFileRDMAMsg;
static inline void WriteLocalFileRDMAMsg_init(WriteLocalFileRDMAMsg* this);
static inline void WriteLocalFileRDMAMsg_initFromSession(WriteLocalFileRDMAMsg* this,
NumNodeID clientNumID, const char* fileHandleID, uint16_t targetID, PathInfo* pathInfo,
unsigned accessFlags, int64_t offset, int64_t count, RdmaInfo *rdmap);
// virtual functions
extern void WriteLocalFileRDMAMsg_serializePayload(NetMessage* this, SerializeCtx* ctx);
// getters & setters
static inline void WriteLocalFileRDMAMsg_setUserdataForQuota(WriteLocalFileRDMAMsg* this, unsigned userID,
unsigned groupID);
/**
* Note: This message supports only serialization, deserialization is not implemented.
*/
struct WriteLocalFileRDMAMsg
{
NetMessage netMessage;
int64_t offset;
int64_t count;
unsigned accessFlags;
NumNodeID clientNumID;
const char* fileHandleID;
unsigned fileHandleIDLen;
uint16_t targetID;
PathInfo* pathInfo;
unsigned userID;
unsigned groupID;
RdmaInfo *rdmap;
};
extern const struct NetMessageOps WriteLocalFileRDMAMsg_Ops;
void WriteLocalFileRDMAMsg_init(WriteLocalFileRDMAMsg* this)
{
NetMessage_init(&this->netMessage, NETMSGTYPE_WriteLocalFileRDMA, &WriteLocalFileRDMAMsg_Ops);
}
/**
* @param fileHandleID just a reference, so do not free it as long as you use this object!
* @param pathInfo just a reference, so do not free it as long as you use this object!
*/
void WriteLocalFileRDMAMsg_initFromSession(WriteLocalFileRDMAMsg* this,
NumNodeID clientNumID, const char* fileHandleID, uint16_t targetID, PathInfo* pathInfo,
unsigned accessFlags, int64_t offset, int64_t count, RdmaInfo *rdmap)
{
WriteLocalFileRDMAMsg_init(this);
this->clientNumID = clientNumID;
this->fileHandleID = fileHandleID;
this->fileHandleIDLen = strlen(fileHandleID);
this->targetID = targetID;
this->pathInfo = pathInfo;
this->accessFlags = accessFlags;
this->offset = offset;
this->count = count;
this->rdmap = rdmap;
}
void WriteLocalFileRDMAMsg_setUserdataForQuota(WriteLocalFileRDMAMsg* this, unsigned userID,
unsigned groupID)
{
NetMessage* thisCast = (NetMessage*) this;
NetMessage_addMsgHeaderFeatureFlag(thisCast, WRITELOCALFILERDMAMSG_FLAG_USE_QUOTA);
this->userID = userID;
this->groupID = groupID;
}
#endif /* BEEGFS_NVFS */
#endif /*WRITELOCALFILERDMAMSG_H_*/

View File

@@ -0,0 +1,34 @@
#ifndef WRITELOCALFILERDMARESPMSG_H_
#define WRITELOCALFILERDMARESPMSG_H_
#ifdef BEEGFS_NVFS
#include <common/net/message/SimpleInt64Msg.h>
struct WriteLocalFileRDMARespMsg;
typedef struct WriteLocalFileRDMARespMsg WriteLocalFileRDMARespMsg;
static inline void WriteLocalFileRDMARespMsg_init(WriteLocalFileRDMARespMsg* this);
// getters & setters
static inline int64_t WriteLocalFileRDMARespMsg_getValue(WriteLocalFileRDMARespMsg* this);
struct WriteLocalFileRDMARespMsg
{
SimpleInt64Msg simpleInt64Msg;
};
void WriteLocalFileRDMARespMsg_init(WriteLocalFileRDMARespMsg* this)
{
SimpleInt64Msg_init( (SimpleInt64Msg*)this, NETMSGTYPE_WriteLocalFileRDMAResp);
}
int64_t WriteLocalFileRDMARespMsg_getValue(WriteLocalFileRDMARespMsg* this)
{
return SimpleInt64Msg_getValue( (SimpleInt64Msg*)this);
}
#endif /* BEEGFS_NVFS */
#endif /*WRITELOCALFILERDMARESPMSG_H_*/

View File

@@ -0,0 +1,32 @@
#ifndef WRITELOCALFILERESPMSG_H_
#define WRITELOCALFILERESPMSG_H_
#include <common/net/message/SimpleInt64Msg.h>
struct WriteLocalFileRespMsg;
typedef struct WriteLocalFileRespMsg WriteLocalFileRespMsg;
static inline void WriteLocalFileRespMsg_init(WriteLocalFileRespMsg* this);
// getters & setters
static inline int64_t WriteLocalFileRespMsg_getValue(WriteLocalFileRespMsg* this);
struct WriteLocalFileRespMsg
{
SimpleInt64Msg simpleInt64Msg;
};
void WriteLocalFileRespMsg_init(WriteLocalFileRespMsg* this)
{
SimpleInt64Msg_init( (SimpleInt64Msg*)this, NETMSGTYPE_WriteLocalFileResp);
}
int64_t WriteLocalFileRespMsg_getValue(WriteLocalFileRespMsg* this)
{
return SimpleInt64Msg_getValue( (SimpleInt64Msg*)this);
}
#endif /*WRITELOCALFILERESPMSG_H_*/