X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Flib%2Fvirtual.h;h=f83d18fead0a0815166c376025c324c4a1c40aa4;hb=c72b14f339b98b45321b0b8d741b517aeac54da1;hp=73538fe94f25e785feb9bfd49dc6feb7dc3e9b8e;hpb=4c0037aecd96cf23da727c12381723ab5cbfa5e4;p=util-vserver.git diff --git a/util-vserver/lib/virtual.h b/util-vserver/lib/virtual.h index 73538fe..f83d18f 100644 --- a/util-vserver/lib/virtual.h +++ b/util-vserver/lib/virtual.h @@ -51,6 +51,9 @@ #define VC_CAT_PROCTRL 12 +#define VC_CAT_SCHED 14 +#define VC_CAT_INODE 38 + #define VC_CAT_RLIMIT 60 #define VC_CAT_SYSTEST 61 @@ -120,4 +123,51 @@ struct vcmd_ctx_rlimit_mask_v0 { #define CRLIM_KEEP (~1ULL) + +#define VC_CAT_SCHED 14 + +/* scheduler vserver commands */ + +#define VCMD_get_sched VC_CMD(SCHED, 1, 1) +#define VCMD_set_sched VC_CMD(SCHED, 2, 1) + + +/* Structure for context's TBF scheduling priorities */ + +struct vcmd_tbf_sched_v1 { + uint32_t fill_level; + uint32_t fill_rate; + uint32_t period; + uint32_t bucket_size; +}; + +#define TBFS_PERIOD_AUTO (0ULL) +#define TBFS_KEEP_VALUE (~0ULL) + + +/* inode vserver commands */ + +#define VCMD_get_iattr VC_CMD(INODE, 1, 0) +#define VCMD_set_iattr VC_CMD(INODE, 2, 0) + +struct vcmd_ctx_iattr_v0 { + uint64_t dev; + uint64_t ino; + uint32_t xid; + uint32_t flags; + uint32_t mask; +}; + +#define IATTR_XID 0x01000000 + +#define IATTR_ADMIN 0x00000001 +#define IATTR_WATCH 0x00000002 +#define IATTR_HIDE 0x00000004 + +#define IATTR_BARRIER 0x00010000 +#define IATTR_IUNLINK 0x00020000 + + + + #endif /* _LINUX_VIRTUAL_H */