"Fossies" - the Fresh Open Source Software Archive

Member "glusterfs-8.2/xlators/meta/src/logfile-link.c" (16 Sep 2020, 885 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 "logfile-link.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 
   17 static int
   18 logfile_link_fill(xlator_t *this, inode_t *inode, strfd_t *strfd)
   19 {
   20     strprintf(strfd, "%s", this->ctx->log.filename);
   21 
   22     return 0;
   23 }
   24 
   25 struct meta_ops logfile_link_ops = {.link_fill = logfile_link_fill};
   26 
   27 int
   28 meta_logfile_link_hook(call_frame_t *frame, xlator_t *this, loc_t *loc,
   29                        dict_t *xdata)
   30 {
   31     meta_ops_set(loc->inode, this, &logfile_link_ops);
   32 
   33     return 0;
   34 }