Motr  M0
m0t1fs.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013-2020 Seagate Technology LLC and/or its Affiliates
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * For any questions about this software or licensing,
17  * please email opensource@seagate.com or cortx-questions@seagate.com.
18  *
19  */
20 
21 
22 #pragma once
23 
24 #ifndef __MOTR_M0T1FS_M0T1FS_H__
25 #define __MOTR_M0T1FS_M0T1FS_H__
26 
27 #include <linux/fs.h>
28 #include <linux/version.h> /* LINUX_VERSION_CODE */
29 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
30 #include <linux/backing-dev.h>
31 #endif
32 #include <linux/pagemap.h>
33 
34 #include "lib/tlist.h"
35 #include "lib/hash.h"
36 #include "lib/mutex.h"
37 #include "lib/semaphore.h"
38 #include "net/net.h" /* m0_net_domain */
39 #include "rpc/rpc.h"
40 #include "reqh/reqh.h"
41 #include "pool/pool.h" /* m0_pool, m0_pool_version, m0_pools_common */
42 #include "net/buffer_pool.h"
43 #include "fid/fid.h"
44 #include "cob/cob.h" /* m0_cob_domain_id */
45 #include "layout/layout.h"
46 #include "ioservice/io_fops.h" /* m0_fop_cob_create_fopt */
47 #include "mdservice/md_fops.h" /* m0_fop_create_fopt */
48 #include "file/file.h" /* m0_file */
49 #include "be/ut/helper.h"
50 #include "spiel/spiel.h" /* m0_spiel */
52 #include "motr/ha.h" /* m0_motr_ha */
53 #include "conf/confc.h" /* m0_conf_state */
54 
638 struct m0_pdclust_layout;
639 
640 M0_INTERNAL int m0t1fs_init(void);
641 M0_INTERNAL void m0t1fs_fini(void);
642 
643 enum {
644  M0T1FS_RPC_TIMEOUT = 100, /* seconds */
645  M0T1FS_RPC_MAX_RETRIES = 10,
646  M0T1FS_RPC_RESEND_INTERVAL = M0_MKTIME(M0T1FS_RPC_TIMEOUT, 0) /
647  M0T1FS_RPC_MAX_RETRIES,
648  M0T1FS_MAX_NR_RPC_IN_FLIGHT = 100,
649  M0T1FS_DEFAULT_NR_DATA_UNITS = 1,
650  M0T1FS_DEFAULT_NR_PARITY_UNITS = 1,
651  M0T1FS_DEFAULT_STRIPE_UNIT_SIZE = PAGE_SIZE,
652  M0T1FS_MAX_NR_CONTAINERS = 4096,
653  M0T1FS_COB_ID_STRLEN = 34,
654 };
655 
657 enum io_req_type {
658  IRT_READ,
659  IRT_WRITE,
660  IRT_TYPE_NR,
661 };
662 
667 struct m0t1fs_sb {
668  struct m0_pools_common csb_pools_common;
669 
671  uint32_t csb_nr_containers;
672 
674  uint64_t csb_next_key;
675 
677  struct m0_mutex csb_mutex;
678 
683  bool csb_active;
684 
690  struct m0_atomic64 csb_pending_io_nr;
691 
693  struct m0_thread csb_astthread;
694 
699  struct m0_chan csb_iowait;
700 
702  struct m0_sm_group csb_iogroup;
703 
705  struct m0_fid csb_root_fid;
706 
708  int csb_namelen;
709 
710  struct m0_net_xprt *csb_xprt;
712  char *csb_laddr;
713  struct m0_net_domain csb_ndom;
714  struct m0_rpc_machine csb_rpc_machine;
715  struct m0_reqh csb_reqh;
716  struct m0_net_buffer_pool csb_buffer_pool;
717 
718  struct m0_be_ut_backend csb_ut_be;
719  struct m0_be_ut_seg csb_ut_seg;
720 
722  size_t csb_tmid;
723 
725  struct dentry *csb_motr_dentry;
726 
728  struct dentry *csb_fid_dentry;
729 
731  struct super_block *csb_sb;
733  struct m0_fop_cob csb_virt_body;
734 
736  bool csb_oostore;
738  bool csb_verify;
739 
741  struct m0_reqh_service_ctx *csb_ha_rsctx;
742 
743  struct m0_motr_ha csb_motr_ha;
744 
746  struct m0_tl csb_inodes;
747  struct m0_mutex csb_inodes_lock;
748 
753  struct m0_htable csb_service_pending_txid_map;
754  struct m0_mutex csb_service_pending_txid_map_lock;
755 
760  struct m0_clink csb_conf_exp;
765  struct m0_clink csb_conf_ready;
770  struct m0_clink csb_conf_ready_async;
771 
776  struct m0_chan csb_conf_ready_chan;
777 
779  struct m0_confc_update_state csb_confc_state;
780 
782  uint64_t csb_reqs_nr;
783 
784  struct m0_fid csb_process_fid;
785  struct m0_fid csb_profile_fid;
786 
787  struct m0_reqh_service *csb_rm_service;
788 
789 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
790  struct backing_dev_info csb_backing_dev_info;
791 #endif
792 };
793 
794 struct m0t1fs_filedata {
795  int fd_direof;
796  struct m0_bitstring *fd_dirpos;
797  uint32_t fd_mds_index;
798 };
799 
803 struct m0t1fs_mdop {
804  struct m0_cob_attr mo_attr;
805  enum m0_cob_type mo_cob_type;
806  struct m0_layout *mo_layout;
807  bool mo_use_hint;
808  uint32_t mo_hash_hint;
809 };
810 
811 M0_TL_DESCR_DECLARE(ispti, extern);
812 M0_TL_DECLARE(ispti, extern, struct m0_reqh_service_txid);
813 
817 struct m0t1fs_inode {
819  struct inode ci_inode;
820  struct m0_fid ci_fid;
822  struct m0_layout_instance *ci_layout_instance;
824  struct m0_mutex ci_layout_lock;
829  struct m0_file ci_flock;
831  struct m0_rm_owner ci_fowner;
833  struct m0_rm_remote ci_creditor;
835  struct m0_fid ci_pver;
837  uint64_t ci_layout_id;
839  struct m0_tl ci_pending_tx;
840  struct m0_mutex ci_pending_tx_lock;
841 
842  uint64_t ci_magic;
844  struct m0_tlink ci_sb_linkage;
845  /* Has layout been changed via setfattr? */
846  bool ci_layout_changed;
847 };
848 
849 M0_TL_DESCR_DECLARE(csb_inodes, M0_EXTERN);
850 M0_TL_DECLARE(csb_inodes, M0_EXTERN, struct m0t1fs_inode);
851 
853 extern struct m0_semaphore m0t1fs_cpus_sem;
854 
855 static inline struct m0t1fs_sb *M0T1FS_SB(const struct super_block *sb)
856 {
857  return sb->s_fs_info;
858 }
859 
860 static inline struct m0t1fs_inode *M0T1FS_I(const struct inode *inode)
861 {
862  return container_of(inode, struct m0t1fs_inode, ci_inode);
863 }
864 
865 extern const struct file_operations m0t1fs_dir_file_operations;
866 extern const struct file_operations m0t1fs_fid_dir_file_operations;
867 extern const struct file_operations m0t1fs_reg_file_operations;
868 
869 extern const struct inode_operations m0t1fs_dir_inode_operations;
870 extern const struct inode_operations m0t1fs_fid_dir_inode_operations;
871 extern const struct inode_operations m0t1fs_reg_inode_operations;
872 
873 extern const struct address_space_operations m0t1fs_aops;
874 
875 /* super.c */
876 
877 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
878 M0_INTERNAL struct dentry *m0t1fs_mount(struct file_system_type *fstype,
879  int flags, const char *devname,
880  void *data);
881 #else
882 M0_INTERNAL int m0t1fs_get_sb(struct file_system_type *fstype,
883  int flags,
884  const char *devname,
885  void *data, struct vfsmount *mnt);
886 #endif
887 
888 M0_INTERNAL void m0t1fs_sb_init(struct m0t1fs_sb *csb);
889 M0_INTERNAL void m0t1fs_sb_fini(struct m0t1fs_sb *csb);
890 
891 M0_INTERNAL void m0t1fs_kill_sb(struct super_block *sb);
892 
893 M0_INTERNAL void m0t1fs_fs_lock(struct m0t1fs_sb *csb);
894 M0_INTERNAL void m0t1fs_fs_unlock(struct m0t1fs_sb *csb);
895 M0_INTERNAL bool m0t1fs_fs_is_locked(const struct m0t1fs_sb *csb);
896 
897 M0_INTERNAL int m0t1fs_fs_conf_lock(struct m0t1fs_sb *csb);
898 M0_INTERNAL void m0t1fs_fs_conf_unlock(struct m0t1fs_sb *csb);
899 
900 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
901 M0_INTERNAL int m0t1fs_getattr(const struct path *path, struct kstat *stat,
902  uint32_t request_mask, uint32_t query_flags);
903 M0_INTERNAL int m0t1fs_fid_getattr(const struct path *path, struct kstat *stat,
904  uint32_t request_mask, uint32_t query_flags);
905 #else
906 M0_INTERNAL int m0t1fs_getattr(struct vfsmount *mnt, struct dentry *de,
907  struct kstat *stat);
908 M0_INTERNAL int m0t1fs_fid_getattr(struct vfsmount *mnt, struct dentry *de,
909  struct kstat *stat);
910 #endif
911 M0_INTERNAL int m0t1fs_setattr(struct dentry *dentry, struct iattr *attr);
912 M0_INTERNAL int m0t1fs_fid_setattr(struct dentry *dentry, struct iattr *attr);
913 M0_INTERNAL void m0t1fs_inode_update(struct inode *inode,
914  struct m0_fop_cob *body);
923 M0_INTERNAL int m0t1fs_ref_get_lock(struct m0t1fs_sb *csb);
924 M0_INTERNAL void m0t1fs_ref_put_lock(struct m0t1fs_sb *csb);
925 
926 M0_INTERNAL struct m0_rpc_session *
928  uint64_t container_id);
929 
930 M0_INTERNAL struct m0_rpc_session *
931 m0t1fs_filename_to_mds_session(const struct m0t1fs_sb *csb,
932  const unsigned char *filename,
933  unsigned int nlen,
934  bool use_hint,
935  uint32_t hash_hint);
936 
937 /* inode.c */
938 
939 M0_INTERNAL int m0t1fs_inode_cache_init(void);
940 M0_INTERNAL void m0t1fs_inode_cache_fini(void);
941 
942 M0_INTERNAL bool m0t1fs_inode_is_root(const struct inode *inode);
943 M0_INTERNAL bool m0t1fs_inode_is_dot_motr(const struct inode *inode);
944 M0_INTERNAL bool m0t1fs_inode_is_dot_motr_fid(const struct inode *inode);
945 
946 M0_INTERNAL struct inode *m0t1fs_root_iget(struct super_block *sb,
947  const struct m0_fid *root_fid);
948 M0_INTERNAL struct inode *m0t1fs_iget(struct super_block *sb,
949  const struct m0_fid *fid,
950  struct m0_fop_cob *body);
951 
952 M0_INTERNAL struct inode *m0t1fs_alloc_inode(struct super_block *sb);
953 M0_INTERNAL void m0t1fs_destroy_inode(struct inode *inode);
954 
955 M0_INTERNAL int m0t1fs_inode_layout_init(struct m0t1fs_inode *ci);
956 M0_INTERNAL int m0t1fs_inode_layout_rebuild(struct m0t1fs_inode *ci,
957  struct m0_fop_cob *body);
958 M0_INTERNAL int m0t1fs_inode_test(struct inode *inode, void *opaque);
959 
960 /* dir.c */
961 
962 M0_INTERNAL struct m0_rm_domain *m0t1fs_rm_domain_get(struct m0t1fs_sb *sb);
963 
964 M0_INTERNAL void m0t1fs_file_lock_init(struct m0t1fs_inode *ci,
965  struct m0t1fs_sb *csb);
966 
967 M0_INTERNAL void m0t1fs_file_lock_fini(struct m0t1fs_inode *ci);
968 
974 struct io_mem_stats {
975  uint64_t a_ioreq_nr;
976  uint64_t d_ioreq_nr;
977  uint64_t a_pargrp_iomap_nr;
978  uint64_t d_pargrp_iomap_nr;
979  uint64_t a_target_ioreq_nr;
980  uint64_t d_target_ioreq_nr;
981  uint64_t a_io_req_fop_nr;
982  uint64_t d_io_req_fop_nr;
983  uint64_t a_data_buf_nr;
984  uint64_t d_data_buf_nr;
985  uint64_t a_page_nr;
986  uint64_t d_page_nr;
987 };
988 
989 M0_INTERNAL int m0t1fs_mds_cob_create(struct m0t1fs_sb *csb,
990  const struct m0t1fs_mdop *mo,
991  struct m0_fop **rep_fop);
992 
993 M0_INTERNAL int m0t1fs_mds_cob_unlink(struct m0t1fs_sb *csb,
994  const struct m0t1fs_mdop *mo,
995  struct m0_fop **rep_fop);
996 
997 M0_INTERNAL int m0t1fs_mds_cob_link(struct m0t1fs_sb *csb,
998  const struct m0t1fs_mdop *mo,
999  struct m0_fop **rep_fop);
1000 
1001 M0_INTERNAL int m0t1fs_mds_cob_lookup(struct m0t1fs_sb *csb,
1002  const struct m0t1fs_mdop *mo,
1003  struct m0_fop **rep_fop);
1004 
1005 M0_INTERNAL int m0t1fs_mds_cob_getattr(struct m0t1fs_sb *csb,
1006  const struct m0t1fs_mdop *mo,
1007  struct m0_fop **rep_fop);
1008 
1009 M0_INTERNAL int m0t1fs_mds_statfs(struct m0t1fs_sb *csb,
1010  struct m0_fop **rep_fop);
1011 
1012 M0_INTERNAL int m0t1fs_mds_cob_setattr(struct m0t1fs_sb *csb,
1013  const struct m0t1fs_mdop *mo,
1014  struct m0_fop **rep_fop);
1015 
1016 M0_INTERNAL int m0t1fs_mds_cob_readdir(struct m0t1fs_sb *csb,
1017  const struct m0t1fs_mdop *mo,
1018  struct m0_fop **rep_fop);
1019 
1020 M0_INTERNAL int m0t1fs_mds_cob_setxattr(struct m0t1fs_sb *csb,
1021  const struct m0t1fs_mdop *mo,
1022  struct m0_fop **rep_fop);
1023 
1024 M0_INTERNAL int m0t1fs_mds_cob_getxattr(struct m0t1fs_sb *csb,
1025  const struct m0t1fs_mdop *mo,
1026  struct m0_fop **rep_fop);
1027 
1028 M0_INTERNAL int m0t1fs_mds_cob_listxattr(struct m0t1fs_sb *csb,
1029  const struct m0t1fs_mdop *mo,
1030  struct m0_fop **rep_fop);
1031 
1032 M0_INTERNAL int m0t1fs_mds_cob_delxattr(struct m0t1fs_sb *csb,
1033  const struct m0t1fs_mdop *mo,
1034  struct m0_fop **rep_fop);
1035 
1036 M0_INTERNAL int m0t1fs_size_update(struct dentry *dentry,
1037  uint64_t newsize);
1038 
1039 M0_INTERNAL int m0t1fs_inode_set_layout_id(struct m0t1fs_inode *ci,
1040  struct m0t1fs_mdop *mo,
1041  int layout_id);
1042 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
1043 extern const struct xattr_handler *m0t1fs_xattr_handlers[];
1044 M0_INTERNAL int m0t1fs_setxattr(const struct xattr_handler *handler,
1045  struct dentry *dentry, struct inode *inode,
1046  const char *name, const void *value,
1047  size_t size, int flags);
1048 M0_INTERNAL int m0t1fs_fid_setxattr(const struct xattr_handler *handler,
1049  struct dentry *dentry, struct inode *inode,
1050  const char *name, const void *value,
1051  size_t size, int flags);
1052 M0_INTERNAL int m0t1fs_getxattr(const struct xattr_handler *handler,
1053  struct dentry *dentry, struct inode *inode,
1054  const char *name, void *buffer,
1055  size_t size);
1056 M0_INTERNAL int m0t1fs_fid_getxattr(const struct xattr_handler *handler,
1057  struct dentry *dentry, struct inode *inode,
1058  const char *name, void *buffer,
1059  size_t size);
1060 #else
1061 M0_INTERNAL int m0t1fs_setxattr(struct dentry *dentry, const char *name,
1062  const void *value, size_t size, int flags);
1063 
1064 M0_INTERNAL int m0t1fs_fid_setxattr(struct dentry *dentry, const char *name,
1065  const void *value, size_t size, int flags);
1066 
1067 M0_INTERNAL ssize_t m0t1fs_getxattr(struct dentry *dentry, const char *name,
1068  void *buffer, size_t size);
1069 
1070 M0_INTERNAL ssize_t m0t1fs_fid_getxattr(struct dentry *dentry, const char *name,
1071  void *buffer, size_t size);
1072 #endif
1073 M0_INTERNAL int m0t1fs_removexattr(struct dentry *dentry, const char *name);
1074 M0_INTERNAL int m0t1fs_fid_removexattr(struct dentry *dentry, const char *name);
1075 
1076 M0_INTERNAL ssize_t m0t1fs_listxattr(struct dentry *dentry, char *buffer,
1077  size_t size);
1078 M0_INTERNAL ssize_t m0t1fs_fid_listxattr(struct dentry *dentry, char *buffer,
1079  size_t size);
1080 
1081 M0_INTERNAL const struct m0_fid *
1082  m0t1fs_inode_fid(const struct m0t1fs_inode *ci);
1083 
1084 void m0t1fs_fid_alloc(struct m0t1fs_sb *csb, struct m0_fid *out);
1085 
1090 void m0t1fs_fid_accept(struct m0t1fs_sb *csb, const struct m0_fid *fid);
1091 
1092 unsigned long fid_hash(const struct m0_fid *fid);
1093 M0_INTERNAL struct m0t1fs_sb *m0_fop_to_sb(struct m0_fop *fop);
1094 M0_INTERNAL struct m0_file *m0_fop_to_file(struct m0_fop *fop);
1095 
1096 M0_INTERNAL int m0t1fs_cob_getattr(struct inode *inode);
1097 M0_INTERNAL int m0t1fs_cob_setattr(struct inode *inode, struct m0t1fs_mdop *mo);
1098 M0_INTERNAL int m0t1fs_fill_cob_attr(struct m0_fop_cob *cob);
1099 M0_INTERNAL struct m0_confc *m0_csb2confc(struct m0t1fs_sb *csb);
1100 M0_INTERNAL struct m0_rconfc *m0_csb2rconfc(struct m0t1fs_sb *csb);
1101 #endif /* __MOTR_M0T1FS_M0T1FS_H__ */
1102 
1103 /*
1104  * Local variables:
1105  * c-indentation-style: "K&R"
1106  * c-basic-offset: 8
1107  * tab-width: 8
1108  * fill-column: 80
1109  * scroll-step: 1
1110  * End:
1111  */
ssize_t m0t1fs_listxattr(struct dentry *dentry, char *buffer, size_t size)
Definition: dir.c:538
M0_INTERNAL struct inode * m0t1fs_iget(struct super_block *sb, const struct m0_fid *fid, struct m0_fop_cob *body)
Definition: inode.c:489
M0_INTERNAL struct m0t1fs_sb * m0_fop_to_sb(struct m0_fop *fop)
Definition: file.c:6012
M0_INTERNAL int m0t1fs_inode_layout_init(struct m0t1fs_inode *ci)
Definition: inode.c:570
int m0t1fs_removexattr(struct dentry *dentry, const char *name)
Definition: dir.c:550
int m0t1fs_mds_cob_lookup(struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
Definition: dir.c:2147
int const char const void size_t int flags
Definition: dir.c:328
M0_INTERNAL int struct dentry struct kstat * stat
Definition: dir.c:1433
M0_INTERNAL int m0t1fs_inode_cache_init(void)
Definition: inode.c:101
M0_INTERNAL int m0t1fs_fill_cob_attr(struct m0_fop_cob *body)
Definition: super.c:1120
M0_INTERNAL const struct m0_fid * m0t1fs_inode_fid(const struct m0t1fs_inode *ci)
Definition: inode.c:61
M0_INTERNAL void m0t1fs_destroy_inode(struct inode *inode)
Definition: inode.c:256
int m0t1fs_mds_cob_getattr(struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
Definition: dir.c:2154
struct m0_bufvec data
Definition: di.c:40
const struct address_space_operations m0t1fs_aops
Definition: file.c:6887
M0_INTERNAL struct m0_rconfc * m0_csb2rconfc(struct m0t1fs_sb *csb)
Definition: super.c:693
M0_INTERNAL struct m0_rpc_session * m0t1fs_filename_to_mds_session(const struct m0t1fs_sb *csb, const unsigned char *filename, unsigned int nlen, bool use_hint, uint32_t hash_hint)
Definition: super.c:130
int const char const void * value
Definition: dir.c:325
struct m0_fid ci_fid
Definition: cas.h:288
ci ci_pver
Definition: dir.c:698
M0_INTERNAL void m0t1fs_file_lock_fini(struct m0t1fs_inode *ci)
Definition: inode.c:162
int m0t1fs_mds_cob_unlink(struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
Definition: dir.c:2133
#define PAGE_SIZE
Definition: lnet_ut.c:277
#define container_of(ptr, type, member)
Definition: misc.h:33
M0_INTERNAL void m0t1fs_sb_init(struct m0t1fs_sb *csb)
Definition: super.c:423
M0_INTERNAL struct dentry * m0t1fs_mount(struct file_system_type *fstype, int flags, const char *devname, void *data)
Definition: super.c:1372
int m0t1fs_mds_cob_getxattr(struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
Definition: dir.c:2182
struct m0t1fs_sb * csb
Definition: dir.c:330
int m0t1fs_mds_cob_setxattr(struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
Definition: dir.c:2175
M0_INTERNAL void m0t1fs_inode_cache_fini(void)
Definition: inode.c:118
struct inode * inode
Definition: dir.c:624
struct m0_fop_cob * body
Definition: dir.c:1436
struct m0_fid fid
Definition: di.c:46
M0_INTERNAL bool m0t1fs_inode_is_dot_motr_fid(const struct inode *inode)
Definition: inode.c:83
#define M0_TL_DESCR_DECLARE(name, scope)
Definition: tlist.h:469
M0_INTERNAL void m0t1fs_sb_fini(struct m0t1fs_sb *csb)
Definition: super.c:445
M0_INTERNAL struct m0_confc * m0_csb2confc(struct m0t1fs_sb *csb)
Definition: super.c:698
M0_INTERNAL void m0t1fs_fs_unlock(struct m0t1fs_sb *csb)
Definition: super.c:112
int m0t1fs_mds_cob_link(struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
Definition: dir.c:2140
const char * name
Definition: trace.c:110
M0_INTERNAL struct m0_file * m0_fop_to_file(struct m0_fop *fop)
Definition: file.c:5998
M0_INTERNAL int m0t1fs_fid_getattr(const struct path *path, struct kstat *stat, uint32_t request_mask, uint32_t query_flags) M0_INTERNAL int m0t1fs_fid_getattr(struct vfsmount *mnt
static void attr(struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
Definition: dump.c:949
ci ci_layout_id
Definition: dir.c:702
static struct m0_cob * cob
Definition: bytecount.c:40
M0_INTERNAL void m0t1fs_fs_conf_unlock(struct m0t1fs_sb *csb)
Definition: dir.c:239
struct m0t1fs_mdop mo
Definition: dir.c:332
M0_INTERNAL void m0t1fs_fini(struct m0t1fs_conf *conf)
Definition: m0t1fs.c:237
static int struct dentry * dentry
Definition: dir.c:589
struct m0_fid pver
Definition: idx_dix.c:74
M0_INTERNAL void m0t1fs_init(struct sim *s, struct m0t1fs_conf *conf)
Definition: m0t1fs.c:173
Definition: tlist.h:251
M0_INTERNAL int m0t1fs_ref_get_lock(struct m0t1fs_sb *csb)
Definition: super.c:722
struct m0t1fs_inode * ci
Definition: dir.c:622
int m0t1fs_setxattr(const struct xattr_handler *handler, struct dentry *dentry, struct inode *inode, const char *name, const void *value, size_t size, int flags) int m0t1fs_setxattr(struct dentry *dentry
int layout_id
Definition: dir.c:331
fd fd_direof
Definition: dir.c:1174
struct m0_semaphore m0t1fs_cpus_sem
Definition: m0t1fs.c:44
#define M0_TL_DECLARE(name, scope, amb_type)
Definition: tlist.h:495
const struct file_operations m0t1fs_fid_dir_file_operations
Definition: dir.c:2557
M0_INTERNAL int m0t1fs_inode_layout_rebuild(struct m0t1fs_inode *ci, struct m0_fop_cob *body)
Definition: inode.c:600
M0_INTERNAL int m0t1fs_setattr(struct dentry *dentry, struct iattr *attr)
Definition: dir.c:1586
Definition: reqh.h:94
static struct super_block super_block
Definition: fsync.c:84
Definition: chan.h:229
int m0t1fs_mds_cob_delxattr(struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
Definition: dir.c:2196
M0_INTERNAL void m0t1fs_kill_sb(struct super_block *sb)
Definition: super.c:1392
int m0t1fs_mds_cob_create(struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
Definition: dir.c:2126
M0_INTERNAL int m0t1fs_fs_conf_lock(struct m0t1fs_sb *csb)
Definition: dir.c:227
M0_INTERNAL void m0t1fs_fs_lock(struct m0t1fs_sb *csb)
Definition: super.c:105
M0_INTERNAL int m0t1fs_cob_setattr(struct inode *inode, struct m0t1fs_mdop *mo)
Definition: dir.c:2477
M0_INTERNAL bool m0t1fs_fs_is_locked(const struct m0t1fs_sb *csb)
Definition: super.c:119
M0_INTERNAL struct inode * m0t1fs_alloc_inode(struct super_block *sb)
Definition: inode.c:236
int m0t1fs_fid_removexattr(struct dentry *dentry, const char *name)
Definition: dir.c:544
const struct xattr_handler * m0t1fs_xattr_handlers[]
Definition: dir.c:2529
M0_INTERNAL int m0t1fs_cob_getattr(struct inode *inode)
Definition: dir.c:2386
m0t1fs_file_lock_init(ci, csb)
Definition: ha.h:54
int m0t1fs_mds_cob_setattr(struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
Definition: dir.c:2161
int m0t1fs_mds_statfs(struct m0t1fs_sb *csb, struct m0_fop **rep_fop)
Definition: dir.c:2119
static struct super_block sb
Definition: file.c:85
int m0t1fs_mds_cob_readdir(struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
Definition: dir.c:2168
Definition: fid.h:38
M0_INTERNAL void m0t1fs_inode_update(struct inode *inode, struct m0_fop_cob *body)
Definition: inode.c:389
int m0t1fs_inode_set_layout_id(struct m0t1fs_inode *ci, struct m0t1fs_mdop *mo, int layout_id)
Definition: dir.c:272
const struct inode_operations m0t1fs_dir_inode_operations
Definition: dir.c:2574
M0_INTERNAL bool m0t1fs_inode_is_root(const struct inode *inode)
Definition: inode.c:68
Definition: addb2.c:200
void m0t1fs_fid_alloc(struct m0t1fs_sb *csb, struct m0_fid *out)
Definition: dir.c:252
m0_bcount_t size
Definition: di.c:39
const struct inode_operations m0t1fs_fid_dir_inode_operations
Definition: dir.c:2592
static struct m0_fop * fop
Definition: item.c:57
void m0t1fs_fid_accept(struct m0t1fs_sb *csb, const struct m0_fid *fid)
Definition: dir.c:265
m0_cob_type
Definition: cob.h:1124
M0_INTERNAL struct m0_rpc_session * m0t1fs_container_id_to_session(const struct m0_pool_version *pver, uint64_t container_id)
Definition: super.c:166
#define M0_MKTIME(secs, ns)
Definition: time.h:86
M0_INTERNAL bool m0t1fs_inode_is_dot_motr(const struct inode *inode)
Definition: inode.c:76
M0_INTERNAL int m0t1fs_inode_test(struct inode *inode, void *opaque)
Definition: inode.c:332
#define out(...)
Definition: gen.c:41
int m0t1fs_fid_getxattr(const struct xattr_handler *handler, struct dentry *dentry, struct inode *inode, const char *name, void *buffer, size_t size) ssize_t m0t1fs_fid_getxattr(struct dentry *dentry
Definition: file.h:81
M0_INTERNAL struct inode * m0t1fs_root_iget(struct super_block *sb, const struct m0_fid *root_fid)
Definition: inode.c:280
const struct inode_operations m0t1fs_reg_inode_operations
Definition: file.c:6771
const struct file_operations m0t1fs_dir_file_operations
Definition: dir.c:2539
Definition: mutex.h:47
M0_INTERNAL void m0t1fs_ref_put_lock(struct m0t1fs_sb *csb)
Definition: super.c:749
const struct file_operations m0t1fs_reg_file_operations
Definition: file.c:5602
M0_INTERNAL int m0t1fs_size_update(struct dentry *dentry, uint64_t newsize)
Definition: dir.c:1525
Definition: fop.h:79
int m0t1fs_getxattr(const struct xattr_handler *handler, struct dentry *dentry, struct inode *inode, const char *name, void *buffer, size_t size) ssize_t m0t1fs_getxattr(struct dentry *dentry
int m0t1fs_mds_cob_listxattr(struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
Definition: dir.c:2189
M0_INTERNAL struct m0_rm_domain * m0t1fs_rm_domain_get(struct m0t1fs_sb *sb)
Definition: inode.c:130
struct m0_fop * rep_fop
Definition: dir.c:334
M0_INTERNAL int m0t1fs_fid_setxattr(const struct xattr_handler *handler, struct dentry *dentry, struct inode *inode, const char *name, const void *value, size_t size, int flags) M0_INTERNAL int m0t1fs_fid_setxattr(struct dentry *dentry