"Fossies" - the Fresh Open Source Software Archive

Member "glusterfs-8.2/xlators/features/read-only/src/read-only.h" (16 Sep 2020, 1020 Bytes) of package /linux/misc/glusterfs-8.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "read-only.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2    Copyright (c) 2014 Red Hat, Inc. <http://www.redhat.com>
    3    This file is part of GlusterFS.
    4 
    5    This file is licensed to you under your choice of the GNU Lesser
    6    General Public License, version 3 or any later version (LGPLv3 or
    7    later), or the GNU General Public License, version 2 (GPLv2), in all
    8    cases as published by the Free Software Foundation.
    9 */
   10 
   11 #ifndef __READONLY_H__
   12 #define __READONLY_H__
   13 
   14 #include <stdint.h>               // for uint64_t, uint8_t
   15 #include <sys/time.h>             // for time_t
   16 #include "glusterfs/glusterfs.h"  // for gf_boolean_t
   17 
   18 typedef struct {
   19     uint8_t worm : 1;
   20     uint8_t retain : 1;
   21     uint8_t legal_hold : 1;
   22     uint8_t ret_mode : 1;
   23     int64_t ret_period;
   24     int64_t auto_commit_period;
   25 } worm_reten_state_t;
   26 
   27 typedef struct {
   28     gf_boolean_t readonly_or_worm_enabled;
   29     gf_boolean_t worm_file;
   30     gf_boolean_t worm_files_deletable;
   31     int64_t reten_period;
   32     int64_t com_period;
   33     int reten_mode;
   34     time_t start_time;
   35 } read_only_priv_t;
   36 
   37 #endif