"Fossies" - the Fresh Open Source Software Archive

Member "glusterfs-8.2/xlators/meta/src/logging-dir.c" (16 Sep 2020, 1073 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 "logging-dir.c" 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 #include <glusterfs/xlator.h>
   12 #include <glusterfs/defaults.h>
   13 
   14 #include "meta-mem-types.h"
   15 #include "meta.h"
   16 #include "meta-hooks.h"
   17 
   18 static struct meta_dirent logging_dir_dirents[] = {
   19     DOT_DOTDOT,
   20 
   21     {
   22         .name = "logfile",
   23         .type = IA_IFLNK,
   24         .hook = meta_logfile_link_hook,
   25     },
   26     {
   27         .name = "loglevel",
   28         .type = IA_IFREG,
   29         .hook = meta_loglevel_file_hook,
   30     },
   31     {.name = NULL}};
   32 
   33 struct meta_ops logging_dir_ops = {
   34     .fixed_dirents = logging_dir_dirents,
   35 };
   36 
   37 int
   38 meta_logging_dir_hook(call_frame_t *frame, xlator_t *this, loc_t *loc,
   39                       dict_t *xdata)
   40 {
   41     meta_ops_set(loc->inode, this, &logging_dir_ops);
   42 
   43     return 0;
   44 }