"Fossies" - the Fresh Open Source Software Archive

Member "glusterfs-8.2/xlators/meta/src/meta-defaults.c" (16 Sep 2020, 18095 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 "meta-defaults.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 #include <glusterfs/compat-errno.h>
   18 
   19 int
   20 meta_default_fgetxattr(call_frame_t *frame, xlator_t *this, fd_t *fd,
   21                        const char *name, dict_t *xdata)
   22 {
   23     return default_fgetxattr_failure_cbk(frame, EPERM);
   24 }
   25 
   26 int
   27 meta_default_fsetxattr(call_frame_t *frame, xlator_t *this, fd_t *fd,
   28                        dict_t *dict, int32_t flags, dict_t *xdata)
   29 {
   30     return default_fsetxattr_failure_cbk(frame, EPERM);
   31 }
   32 
   33 int
   34 meta_default_setxattr(call_frame_t *frame, xlator_t *this, loc_t *loc,
   35                       dict_t *dict, int32_t flags, dict_t *xdata)
   36 {
   37     return default_setxattr_failure_cbk(frame, EPERM);
   38 }
   39 
   40 int
   41 meta_default_statfs(call_frame_t *frame, xlator_t *this, loc_t *loc,
   42                     dict_t *xdata)
   43 {
   44     return default_statfs_failure_cbk(frame, EPERM);
   45 }
   46 
   47 int
   48 meta_default_fsyncdir(call_frame_t *frame, xlator_t *this, fd_t *fd,
   49                       int32_t flags, dict_t *xdata)
   50 {
   51     return default_fsyncdir_failure_cbk(frame, EPERM);
   52 }
   53 
   54 int
   55 meta_default_opendir(call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd,
   56                      dict_t *xdata)
   57 {
   58     META_STACK_UNWIND(opendir, frame, 0, 0, fd, xdata);
   59     return 0;
   60 }
   61 
   62 int
   63 meta_default_fstat(call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
   64 {
   65     struct iatt iatt = {};
   66 
   67     meta_iatt_fill(&iatt, fd->inode, fd->inode->ia_type);
   68 
   69     META_STACK_UNWIND(fstat, frame, 0, 0, &iatt, xdata);
   70 
   71     return 0;
   72 }
   73 
   74 int
   75 meta_default_fsync(call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags,
   76                    dict_t *xdata)
   77 {
   78     return default_fsync_failure_cbk(frame, EPERM);
   79 }
   80 
   81 int
   82 meta_default_flush(call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
   83 {
   84     META_STACK_UNWIND(flush, frame, 0, 0, xdata);
   85     return 0;
   86 }
   87 
   88 int
   89 meta_default_writev(call_frame_t *frame, xlator_t *this, fd_t *fd,
   90                     struct iovec *vector, int32_t count, off_t off,
   91                     uint32_t flags, struct iobref *iobref, dict_t *xdata)
   92 {
   93     struct meta_ops *ops = NULL;
   94     int ret = 0;
   95     struct iatt dummy = {};
   96 
   97     ops = meta_ops_get(fd->inode, this);
   98     if (!ops)
   99         goto err;
  100 
  101     if (!ops->file_write)
  102         goto err;
  103 
  104     ret = ops->file_write(this, fd, vector, count);
  105 
  106     META_STACK_UNWIND(writev, frame, (ret >= 0 ? ret : -1),
  107                       (ret < 0 ? -ret : 0), &dummy, &dummy, xdata);
  108     return 0;
  109 err:
  110     return default_writev_failure_cbk(frame, EPERM);
  111 }
  112 
  113 int
  114 meta_default_readv(call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
  115                    off_t offset, uint32_t flags, dict_t *xdata)
  116 {
  117     meta_fd_t *meta_fd = NULL;
  118     struct iovec iov = {};
  119     struct iobuf *iobuf = NULL;
  120     struct iobref *iobref = NULL;
  121     off_t copy_offset = 0;
  122     int copy_size = 0;
  123     struct iatt iatt = {};
  124 
  125     meta_fd = meta_fd_get(fd, this);
  126     if (!meta_fd)
  127         return default_readv_failure_cbk(frame, ENODATA);
  128 
  129     if (!meta_fd->size)
  130         meta_file_fill(this, fd);
  131 
  132     iobuf = iobuf_get2(this->ctx->iobuf_pool, size);
  133     if (!iobuf)
  134         return default_readv_failure_cbk(frame, ENOMEM);
  135 
  136     iobref = iobref_new();
  137     if (!iobref) {
  138         iobuf_unref(iobuf);
  139         return default_readv_failure_cbk(frame, ENOMEM);
  140     }
  141 
  142     if (iobref_add(iobref, iobuf) != 0) {
  143         iobref_unref(iobref);
  144         iobuf_unref(iobuf);
  145         return default_readv_failure_cbk(frame, ENOMEM);
  146     }
  147 
  148     iov.iov_base = iobuf_ptr(iobuf);
  149 
  150     /* iobref would have taken a ref */
  151     iobuf_unref(iobuf);
  152 
  153     copy_offset = min(meta_fd->size, offset);
  154     copy_size = min(size, (meta_fd->size - copy_offset));
  155 
  156     if (copy_size)
  157         memcpy(iov.iov_base, meta_fd->data + copy_offset, copy_size);
  158     iov.iov_len = copy_size;
  159 
  160     META_STACK_UNWIND(readv, frame, copy_size, 0, &iov, 1, &iatt, iobref, 0);
  161 
  162     iobref_unref(iobref);
  163 
  164     return 0;
  165 }
  166 
  167 int
  168 meta_default_open(call_frame_t *frame, xlator_t *this, loc_t *loc,
  169                   int32_t flags, fd_t *fd, dict_t *xdata)
  170 {
  171     dict_t *xdata_rsp = NULL;
  172 
  173     xdata_rsp = meta_direct_io_mode(xdata, frame);
  174 
  175     META_STACK_UNWIND(open, frame, 0, 0, fd, xdata_rsp);
  176 
  177     return 0;
  178 }
  179 
  180 int
  181 meta_default_create(call_frame_t *frame, xlator_t *this, loc_t *loc,
  182                     int32_t flags, mode_t mode, mode_t umask, fd_t *fd,
  183                     dict_t *xdata)
  184 {
  185     return default_create_failure_cbk(frame, EPERM);
  186 }
  187 
  188 int
  189 meta_default_link(call_frame_t *frame, xlator_t *this, loc_t *oldloc,
  190                   loc_t *newloc, dict_t *xdata)
  191 {
  192     return default_link_failure_cbk(frame, EPERM);
  193 }
  194 
  195 int
  196 meta_default_rename(call_frame_t *frame, xlator_t *this, loc_t *oldloc,
  197                     loc_t *newloc, dict_t *xdata)
  198 {
  199     return default_rename_failure_cbk(frame, EPERM);
  200 }
  201 
  202 int
  203 meta_default_symlink(call_frame_t *frame, xlator_t *this, const char *linkpath,
  204                      loc_t *loc, mode_t umask, dict_t *xdata)
  205 {
  206     return default_symlink_failure_cbk(frame, EPERM);
  207 }
  208 
  209 int
  210 meta_default_rmdir(call_frame_t *frame, xlator_t *this, loc_t *loc, int flags,
  211                    dict_t *xdata)
  212 {
  213     return default_rmdir_failure_cbk(frame, EPERM);
  214 }
  215 
  216 int
  217 meta_default_unlink(call_frame_t *frame, xlator_t *this, loc_t *loc, int xflag,
  218                     dict_t *xdata)
  219 {
  220     return default_unlink_failure_cbk(frame, EPERM);
  221 }
  222 
  223 int
  224 meta_default_mkdir(call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
  225                    mode_t umask, dict_t *xdata)
  226 {
  227     return default_mkdir_failure_cbk(frame, EPERM);
  228 }
  229 
  230 int
  231 meta_default_mknod(call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
  232                    dev_t rdev, mode_t umask, dict_t *xdata)
  233 {
  234     return default_mknod_failure_cbk(frame, EPERM);
  235 }
  236 
  237 int
  238 meta_default_readlink(call_frame_t *frame, xlator_t *this, loc_t *loc,
  239                       size_t size, dict_t *xdata)
  240 {
  241     struct meta_ops *ops = NULL;
  242     strfd_t *strfd = NULL;
  243     struct iatt iatt = {};
  244     int len = -1;
  245 
  246     ops = meta_ops_get(loc->inode, this);
  247     if (!ops || !ops->link_fill) {
  248         META_STACK_UNWIND(readlink, frame, -1, EPERM, 0, 0, 0);
  249         return 0;
  250     }
  251 
  252     strfd = strfd_open();
  253     if (!strfd) {
  254         META_STACK_UNWIND(readlink, frame, -1, ENOMEM, 0, 0, 0);
  255         return 0;
  256     }
  257 
  258     ops->link_fill(this, loc->inode, strfd);
  259 
  260     meta_iatt_fill(&iatt, loc->inode, IA_IFLNK);
  261 
  262     if (strfd->data) {
  263         len = strlen(strfd->data);
  264         META_STACK_UNWIND(readlink, frame, len, 0, strfd->data, &iatt, xdata);
  265     } else
  266         META_STACK_UNWIND(readlink, frame, -1, ENODATA, 0, 0, 0);
  267 
  268     strfd_close(strfd);
  269 
  270     return 0;
  271 }
  272 
  273 int
  274 meta_default_access(call_frame_t *frame, xlator_t *this, loc_t *loc,
  275                     int32_t mask, dict_t *xdata)
  276 {
  277     return default_access_failure_cbk(frame, EPERM);
  278 }
  279 
  280 int
  281 meta_default_ftruncate(call_frame_t *frame, xlator_t *this, fd_t *fd,
  282                        off_t offset, dict_t *xdata)
  283 {
  284     struct iatt iatt = {};
  285 
  286     meta_iatt_fill(&iatt, fd->inode, IA_IFREG);
  287 
  288     META_STACK_UNWIND(ftruncate, frame, 0, 0, &iatt, &iatt, xdata);
  289 
  290     return 0;
  291 }
  292 
  293 int
  294 meta_default_getxattr(call_frame_t *frame, xlator_t *this, loc_t *loc,
  295                       const char *name, dict_t *xdata)
  296 {
  297     return default_getxattr_failure_cbk(frame, EPERM);
  298 }
  299 
  300 int
  301 meta_default_xattrop(call_frame_t *frame, xlator_t *this, loc_t *loc,
  302                      gf_xattrop_flags_t flags, dict_t *dict, dict_t *xdata)
  303 {
  304     return default_xattrop_failure_cbk(frame, EPERM);
  305 }
  306 
  307 int
  308 meta_default_fxattrop(call_frame_t *frame, xlator_t *this, fd_t *fd,
  309                       gf_xattrop_flags_t flags, dict_t *dict, dict_t *xdata)
  310 {
  311     return default_fxattrop_failure_cbk(frame, EPERM);
  312 }
  313 
  314 int
  315 meta_default_removexattr(call_frame_t *frame, xlator_t *this, loc_t *loc,
  316                          const char *name, dict_t *xdata)
  317 {
  318     return default_removexattr_failure_cbk(frame, EPERM);
  319 }
  320 
  321 int
  322 meta_default_fremovexattr(call_frame_t *frame, xlator_t *this, fd_t *fd,
  323                           const char *name, dict_t *xdata)
  324 {
  325     return default_fremovexattr_failure_cbk(frame, EPERM);
  326 }
  327 
  328 int
  329 meta_default_lk(call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd,
  330                 struct gf_flock *lock, dict_t *xdata)
  331 {
  332     return default_lk_failure_cbk(frame, EPERM);
  333 }
  334 
  335 int
  336 meta_default_inodelk(call_frame_t *frame, xlator_t *this, const char *volume,
  337                      loc_t *loc, int32_t cmd, struct gf_flock *lock,
  338                      dict_t *xdata)
  339 {
  340     return default_inodelk_failure_cbk(frame, EPERM);
  341 }
  342 
  343 int
  344 meta_default_finodelk(call_frame_t *frame, xlator_t *this, const char *volume,
  345                       fd_t *fd, int32_t cmd, struct gf_flock *lock,
  346                       dict_t *xdata)
  347 {
  348     return default_finodelk_failure_cbk(frame, EPERM);
  349 }
  350 
  351 int
  352 meta_default_entrylk(call_frame_t *frame, xlator_t *this, const char *volume,
  353                      loc_t *loc, const char *basename, entrylk_cmd cmd,
  354                      entrylk_type type, dict_t *xdata)
  355 {
  356     return default_entrylk_failure_cbk(frame, EPERM);
  357 }
  358 
  359 int
  360 meta_default_fentrylk(call_frame_t *frame, xlator_t *this, const char *volume,
  361                       fd_t *fd, const char *basename, entrylk_cmd cmd,
  362                       entrylk_type type, dict_t *xdata)
  363 {
  364     return default_fentrylk_failure_cbk(frame, EPERM);
  365 }
  366 
  367 int
  368 meta_default_rchecksum(call_frame_t *frame, xlator_t *this, fd_t *fd,
  369                        off_t offset, int32_t len, dict_t *xdata)
  370 {
  371     return default_rchecksum_failure_cbk(frame, EPERM);
  372 }
  373 
  374 int
  375 meta_default_readdir(call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
  376                      off_t off, dict_t *xdata)
  377 {
  378     meta_fd_t *meta_fd = NULL;
  379     int i = 0;
  380     gf_dirent_t head;
  381     gf_dirent_t *list = NULL;
  382     int ret = 0;
  383     int this_size = 0;
  384     int filled_size = 0;
  385     int fixed_size = 0;
  386     int dyn_size = 0;
  387     struct meta_dirent *fixed_dirents = NULL;
  388     struct meta_dirent *dyn_dirents = NULL;
  389     struct meta_dirent *dirents = NULL;
  390     struct meta_dirent *end = NULL;
  391     struct meta_ops *ops = NULL;
  392 
  393     INIT_LIST_HEAD(&head.list);
  394 
  395     ops = meta_ops_get(fd->inode, this);
  396     if (!ops)
  397         goto err;
  398 
  399     meta_fd = meta_fd_get(fd, this);
  400     if (!meta_fd)
  401         goto err;
  402 
  403     meta_dir_fill(this, fd);
  404 
  405     fixed_dirents = ops->fixed_dirents;
  406     fixed_size = fixed_dirents_len(fixed_dirents);
  407 
  408     dyn_dirents = meta_fd->dirents;
  409     dyn_size = meta_fd->size;
  410 
  411     for (i = off; i < (fixed_size + dyn_size);) {
  412         if (i >= fixed_size) {
  413             dirents = dyn_dirents + (i - fixed_size);
  414             end = dyn_dirents + dyn_size;
  415         } else {
  416             dirents = fixed_dirents + i;
  417             end = fixed_dirents + fixed_size;
  418         }
  419 
  420         while (dirents < end) {
  421             this_size = sizeof(gf_dirent_t) + strlen(dirents->name) + 1;
  422             if (this_size + filled_size > size)
  423                 goto unwind;
  424 
  425             list = gf_dirent_for_name(dirents->name);
  426             if (!list)
  427                 break;
  428 
  429             list->d_off = i + 1;
  430             list->d_ino = i + 42;
  431             switch (dirents->type) {
  432                 case IA_IFDIR:
  433                     list->d_type = DT_DIR;
  434                     break;
  435                 case IA_IFCHR:
  436                     list->d_type = DT_CHR;
  437                     break;
  438                 case IA_IFBLK:
  439                     list->d_type = DT_BLK;
  440                     break;
  441                 case IA_IFIFO:
  442                     list->d_type = DT_FIFO;
  443                     break;
  444                 case IA_IFLNK:
  445                     list->d_type = DT_LNK;
  446                     break;
  447                 case IA_IFREG:
  448                     list->d_type = DT_REG;
  449                     break;
  450                 case IA_IFSOCK:
  451                     list->d_type = DT_SOCK;
  452                     break;
  453                 case IA_INVAL:
  454                     list->d_type = DT_UNKNOWN;
  455                     break;
  456             }
  457 
  458             list_add_tail(&list->list, &head.list);
  459             ret++;
  460             i++;
  461             dirents++;
  462             filled_size += this_size;
  463         }
  464     }
  465 
  466 unwind:
  467     META_STACK_UNWIND(readdir, frame, ret, 0, &head, xdata);
  468 
  469     gf_dirent_free(&head);
  470 
  471     return 0;
  472 err:
  473     META_STACK_UNWIND(readdir, frame, -1, ENOMEM, 0, 0);
  474     return 0;
  475 }
  476 
  477 int
  478 meta_default_readdirp(call_frame_t *frame, xlator_t *this, fd_t *fd,
  479                       size_t size, off_t off, dict_t *xdata)
  480 {
  481     return meta_default_readdir(frame, this, fd, size, off, xdata);
  482 }
  483 
  484 int
  485 meta_default_setattr(call_frame_t *frame, xlator_t *this, loc_t *loc,
  486                      struct iatt *stbuf, int32_t valid, dict_t *xdata)
  487 {
  488     return default_setattr_failure_cbk(frame, EPERM);
  489 }
  490 
  491 int
  492 meta_default_truncate(call_frame_t *frame, xlator_t *this, loc_t *loc,
  493                       off_t offset, dict_t *xdata)
  494 {
  495     struct iatt iatt = {};
  496 
  497     meta_iatt_fill(&iatt, loc->inode, IA_IFREG);
  498 
  499     META_STACK_UNWIND(truncate, frame, 0, 0, &iatt, &iatt, xdata);
  500 
  501     return 0;
  502 }
  503 
  504 int
  505 meta_default_stat(call_frame_t *frame, xlator_t *this, loc_t *loc,
  506                   dict_t *xdata)
  507 {
  508     struct iatt iatt = {};
  509 
  510     meta_iatt_fill(&iatt, loc->inode, loc->inode->ia_type);
  511 
  512     META_STACK_UNWIND(stat, frame, 0, 0, &iatt, xdata);
  513 
  514     return 0;
  515 }
  516 
  517 int
  518 meta_default_lookup(call_frame_t *frame, xlator_t *this, loc_t *loc,
  519                     dict_t *xdata)
  520 {
  521     struct meta_ops *ops = NULL;
  522     struct meta_dirent *dirent = NULL;
  523     struct meta_dirent *dp = NULL;
  524     int i = 0;
  525     int ret = 0;
  526 
  527     if (!loc->name)
  528         return meta_inode_discover(frame, this, loc, xdata);
  529 
  530     ops = meta_ops_get(loc->parent, this);
  531     if (!ops)
  532         return default_lookup_failure_cbk(frame, EPERM);
  533 
  534     for (dirent = ops->fixed_dirents; dirent && dirent->name; dirent++) {
  535         if (strcmp(dirent->name, loc->name) == 0)
  536             goto hook;
  537     }
  538 
  539     dirent = NULL;
  540     if (ops->dir_fill)
  541         ret = ops->dir_fill(this, loc->parent, &dp);
  542 
  543     for (i = 0; i < ret; i++) {
  544         if (strcmp(dp[i].name, loc->name) == 0) {
  545             dirent = &dp[i];
  546             goto hook;
  547         }
  548     }
  549 hook:
  550     if (dirent && dirent->hook) {
  551         struct iatt parent = {};
  552         struct iatt iatt = {};
  553 
  554         dirent->hook(frame, this, loc, xdata);
  555 
  556         meta_iatt_fill(&iatt, loc->inode, dirent->type);
  557 
  558         META_STACK_UNWIND(lookup, frame, 0, 0, loc->inode, &iatt, xdata,
  559                           &parent);
  560     } else {
  561         META_STACK_UNWIND(lookup, frame, -1, ENOENT, 0, 0, 0, 0);
  562     }
  563 
  564     for (i = 0; i < ret; i++)
  565         GF_FREE((void *)dp[i].name);
  566     GF_FREE(dp);
  567 
  568     return 0;
  569 }
  570 
  571 int
  572 meta_default_fsetattr(call_frame_t *frame, xlator_t *this, fd_t *fd,
  573                       struct iatt *stbuf, int32_t valid, dict_t *xdata)
  574 {
  575     return default_fsetattr_failure_cbk(frame, EPERM);
  576 }
  577 
  578 int
  579 meta_default_fallocate(call_frame_t *frame, xlator_t *this, fd_t *fd,
  580                        int32_t keep_size, off_t offset, size_t len,
  581                        dict_t *xdata)
  582 {
  583     return default_fallocate_failure_cbk(frame, EPERM);
  584 }
  585 
  586 int
  587 meta_default_discard(call_frame_t *frame, xlator_t *this, fd_t *fd,
  588                      off_t offset, size_t len, dict_t *xdata)
  589 {
  590     return default_discard_failure_cbk(frame, EPERM);
  591 }
  592 
  593 int
  594 meta_default_zerofill(call_frame_t *frame, xlator_t *this, fd_t *fd,
  595                       off_t offset, off_t len, dict_t *xdata)
  596 {
  597     return default_zerofill_failure_cbk(frame, EPERM);
  598 }
  599 
  600 #define SET_META_DEFAULT_FOP(f, name)                                          \
  601     do {                                                                       \
  602         if (!f->name)                                                          \
  603             f->name = meta_default_##name;                                     \
  604     } while (0)
  605 
  606 struct xlator_fops *
  607 meta_defaults_init(struct xlator_fops *fops)
  608 {
  609     SET_META_DEFAULT_FOP(fops, create);
  610     SET_META_DEFAULT_FOP(fops, open);
  611     SET_META_DEFAULT_FOP(fops, stat);
  612     SET_META_DEFAULT_FOP(fops, readlink);
  613     SET_META_DEFAULT_FOP(fops, mknod);
  614     SET_META_DEFAULT_FOP(fops, mkdir);
  615     SET_META_DEFAULT_FOP(fops, unlink);
  616     SET_META_DEFAULT_FOP(fops, rmdir);
  617     SET_META_DEFAULT_FOP(fops, symlink);
  618     SET_META_DEFAULT_FOP(fops, rename);
  619     SET_META_DEFAULT_FOP(fops, link);
  620     SET_META_DEFAULT_FOP(fops, truncate);
  621     SET_META_DEFAULT_FOP(fops, readv);
  622     SET_META_DEFAULT_FOP(fops, writev);
  623     SET_META_DEFAULT_FOP(fops, statfs);
  624     SET_META_DEFAULT_FOP(fops, flush);
  625     SET_META_DEFAULT_FOP(fops, fsync);
  626     SET_META_DEFAULT_FOP(fops, setxattr);
  627     SET_META_DEFAULT_FOP(fops, getxattr);
  628     SET_META_DEFAULT_FOP(fops, fsetxattr);
  629     SET_META_DEFAULT_FOP(fops, fgetxattr);
  630     SET_META_DEFAULT_FOP(fops, removexattr);
  631     SET_META_DEFAULT_FOP(fops, fremovexattr);
  632     SET_META_DEFAULT_FOP(fops, opendir);
  633     SET_META_DEFAULT_FOP(fops, readdir);
  634     SET_META_DEFAULT_FOP(fops, readdirp);
  635     SET_META_DEFAULT_FOP(fops, fsyncdir);
  636     SET_META_DEFAULT_FOP(fops, access);
  637     SET_META_DEFAULT_FOP(fops, ftruncate);
  638     SET_META_DEFAULT_FOP(fops, fstat);
  639     SET_META_DEFAULT_FOP(fops, lk);
  640     SET_META_DEFAULT_FOP(fops, inodelk);
  641     SET_META_DEFAULT_FOP(fops, finodelk);
  642     SET_META_DEFAULT_FOP(fops, entrylk);
  643     SET_META_DEFAULT_FOP(fops, fentrylk);
  644     SET_META_DEFAULT_FOP(fops, lookup);
  645     SET_META_DEFAULT_FOP(fops, rchecksum);
  646     SET_META_DEFAULT_FOP(fops, xattrop);
  647     SET_META_DEFAULT_FOP(fops, fxattrop);
  648     SET_META_DEFAULT_FOP(fops, setattr);
  649     SET_META_DEFAULT_FOP(fops, fsetattr);
  650     SET_META_DEFAULT_FOP(fops, fallocate);
  651     SET_META_DEFAULT_FOP(fops, discard);
  652     SET_META_DEFAULT_FOP(fops, zerofill);
  653 
  654     return fops;
  655 }