Motr  M0
dir.c File Reference
#include <linux/version.h>
#include <linux/cred.h>
#include <linux/uidgid.h>
#include <linux/xattr.h>
#include "lib/trace.h"
#include "lib/misc.h"
#include "lib/memory.h"
#include "lib/bob.h"
#include "fop/fop.h"
#include "rpc/rpclib.h"
#include "rpc/rpc_opcodes.h"
#include "conf/helpers.h"
#include "motr/magic.h"
#include "layout/layout.h"
#include "layout/layout_internal.h"
#include "layout/pdclust.h"
#include "m0t1fs/linux_kernel/m0t1fs.h"
Include dependency graph for dir.c:

Go to the source code of this file.

Data Structures

struct  cob_req
 
struct  cob_fop
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_M0T1FS
 

Enumerations

enum  { COB_REQ_DEADLINE = 2000000 }
 

Functions

static void cob_rpc_item_cb (struct m0_rpc_item *item)
 
M0_INTERNAL void m0t1fs_inode_bob_init (struct m0t1fs_inode *bob)
 
M0_INTERNAL bool m0t1fs_inode_bob_check (struct m0t1fs_inode *bob)
 
static int file_lock_acquire (struct m0_rm_incoming *rm_in, struct m0t1fs_inode *ci)
 
static void file_lock_release (struct m0_rm_incoming *rm_in)
 
static int m0t1fs_component_objects_op (struct m0t1fs_inode *ci, struct m0t1fs_mdop *mop, int(*func)(struct cob_req *, const struct m0t1fs_inode *, const struct m0t1fs_mdop *, int idx))
 
static int m0t1fs_ios_cob_create (struct cob_req *cr, const struct m0t1fs_inode *inode, const struct m0t1fs_mdop *mop, int idx)
 
static int m0t1fs_ios_cob_delete (struct cob_req *cr, const struct m0t1fs_inode *inode, const struct m0t1fs_mdop *mop, int idx)
 
static int m0t1fs_ios_cob_setattr (struct cob_req *cr, const struct m0t1fs_inode *inode, const struct m0t1fs_mdop *mop, int idx)
 
static int m0t1fs_ios_cob_truncate (struct cob_req *cr, const struct m0t1fs_inode *inode, const struct m0t1fs_mdop *mop, int idx)
 
static int name_mem2wire (struct m0_fop_str *tgt, const struct m0_buf *name)
 
static void body_mem2wire (struct m0_fop_cob *body, const struct m0_cob_attr *attr, int valid)
 
static void body_wire2mem (struct m0_cob_attr *attr, const struct m0_fop_cob *body)
 
M0_INTERNAL int m0t1fs_fs_conf_lock (struct m0t1fs_sb *csb)
 
M0_INTERNAL void m0t1fs_fs_conf_unlock (struct m0t1fs_sb *csb)
 
void m0t1fs_fid_alloc (struct m0t1fs_sb *csb, struct m0_fid *out)
 
void m0t1fs_fid_accept (struct m0t1fs_sb *csb, const struct m0_fid *fid)
 
int m0t1fs_inode_set_layout_id (struct m0t1fs_inode *ci, struct m0t1fs_mdop *mo, int layout_id)
 
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
 
 M0_ENTRY ("Setting %.*s's xattr %s=%.*s", dentry->d_name.len,(char *) dentry->d_name.name, name,(int) size,(char *) value)
 
 if (value==NULL)
 
else if (m0_streq(name, "writesize"))
 
m0_buf_initmo (void *) value, size
 
 m0_fop_put0_lock (rep_fop)
 
return M0_RC (rc)
 
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
 
return M0_ERR (-EOPNOTSUPP)
 
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
 
 M0_ENTRY ("Getting %.*s's xattr %s", dentry->d_name.len,(char *) dentry->d_name.name, name)
 
 if (rc !=0)
 
 if (m0_streq(name, "lid"))
 
 if (csb->csb_oostore)
 
m0_buf_initmo (char *) dentry->d_name.name, dentry->d_name.len
 
 if (rc==0)
 
ssize_t m0t1fs_listxattr (struct dentry *dentry, char *buffer, size_t size)
 
int m0t1fs_fid_removexattr (struct dentry *dentry, const char *name)
 
int m0t1fs_removexattr (struct dentry *dentry, const char *name)
 
static int m0t1fs_fid_create (struct inode *dir, struct dentry *dentry, umode_t mode, bool excl) static int m0t1fs_fid_create(struct inode *dir
 
static int m0t1fs_fid_check (struct m0_fid *fid)
 
static int m0t1fs_create (struct inode *dir, struct dentry *dentry, umode_t mode, bool excl) static int m0t1fs_create(struct inode *dir
 
 M0_LOG (M0_DEBUG, "Creating \s\in pdir %lu "FID_F,(char *) dentry->d_name.name, dir->i_ino, FID_P(m0t1fs_inode_fid(M0T1FS_I(dir))))
 
 M0_LOG (M0_DEBUG, "New fid = "FID_F, FID_P(&new_fid))
 
 if (dir->i_mode &S_ISGID)
 
 if (S_ISDIR(mode))
 
 M0_LOG (M0_INFO, "Creating \s\with pool version "FID_F,(char *) dentry->d_name.name, FID_P(&ci->ci_pver))
 
 m0t1fs_file_lock_init (ci, csb)
 
 if (!csb->csb_oostore)
 
 if (S_ISREG(mode) &&csb->csb_oostore)
 
 if (insert_inode_locked4(inode, inode->i_ino, &m0t1fs_inode_test, &gfid)< 0)
 
 unlock_new_inode (inode)
 
 mark_inode_dirty (dir)
 
 d_instantiate (dentry, inode)
 
 m0t1fs_fs_conf_unlock (csb)
 
 if (i_err)
 
 M0_ADDB2_ADD (M0_AVI_FS_CREATE, new_fid.f_container, new_fid.f_key, mode, rc)
 
static int m0t1fs_fid_mkdir (struct inode *dir, struct dentry *dentry, umode_t mode) static int m0t1fs_fid_mkdir(struct inode *dir
 
return m0t1fs_fid_create (dir, dentry, mode|S_IFDIR, NULL)
 
static int m0t1fs_mkdir (struct inode *dir, struct dentry *dentry, umode_t mode) static int m0t1fs_mkdir(struct inode *dir
 
return m0t1fs_create (dir, dentry, mode|S_IFDIR, NULL)
 
static struct dentrym0t1fs_lookup (struct inode *dir, struct dentry *dentry, unsigned int flags) static struct dentry *m0t1fs_lookup(struct inode *dir
 
 m0_addb2_add (M0_AVI_FS_LOOKUP, M0_ADDB2_OBJ(&M0T1FS_I(dir) ->ci_fid))
 
 if (dentry->d_name.len > csb->csb_namelen)
 
 M0_LOG (M0_INFO, "Name: \s\,(char *) dentry->d_name.name)
 
 if (IS_ERR(inode))
 
 M0_LEAVE ()
 
return dcache_splice static d_splice_alias(inode, dentry) struct dentrym0t1fs_fid_lookup (struct inode *dir, struct dentry *dentry, unsigned int flags) static struct dentry *m0t1fs_fid_lookup(struct inode *dir
 
return m0t1fs_lookup (dir, dentry, flags)
 
return m0t1fs_lookup (dir, dentry, nd)
 
struct m0_direntdirent_next (struct m0_dirent *ent)
 
struct m0_direntdirent_first (struct m0_fop_readdir_rep *rep)
 
static int m0t1fs_opendir (struct inode *inode, struct file *file)
 
static int m0t1fs_fid_opendir (struct inode *inode, struct file *file)
 
static int m0t1fs_releasedir (struct inode *inode, struct file *file)
 
static int m0t1fs_fid_releasedir (struct inode *inode, struct file *file)
 
static int m0t1fs_fid_readdir (struct file *f, struct dir_context *ctx)
 
static int m0t1fs_fid_readdir (struct file *f, void *buf, filldir_t filldir)
 
static int m0t1fs_readdir (struct file *f, struct dir_context *ctx) static int m0t1fs_readdir(struct file *f
 
 if (fd->fd_direof) return M0_RC(0)
 
 while (rc==0)
 
 if (++fd->fd_mds_index< csb->csb_pools_common.pc_nr_svcs[M0_CST_MDS])
 
static int m0t1fs_fid_link (struct dentry *old, struct inode *dir, struct dentry *new)
 
static int m0t1fs_link (struct dentry *old, struct inode *dir, struct dentry *new)
 
static int m0t1fs_fid_unlink (struct inode *dir, struct dentry *dentry)
 
static int m0t1fs_unlink (struct inode *dir, struct dentry *dentry)
 
static int m0t1fs_fid_rmdir (struct inode *dir, struct dentry *dentry)
 
static int m0t1fs_rmdir (struct inode *dir, struct dentry *dentry)
 
static int m0t1fs_inode_update_stat (struct inode *inode, struct m0_fop_cob *body, struct kstat *stat)
 
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
 
M0_INTERNAL int m0t1fs_size_update (struct dentry *dentry, uint64_t newsize)
 
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
 
M0_INTERNAL int m0t1fs_setattr (struct dentry *dentry, struct iattr *attr)
 
static int m0t1fs_mds_cob_fop_populate (struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop *fop)
 
static int m0t1fs_mds_cob_op (struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop_type *ftype, struct m0_fop **rep_fop)
 
int m0t1fs_mds_statfs (struct m0t1fs_sb *csb, struct m0_fop **rep_fop)
 
int m0t1fs_mds_cob_create (struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
 
int m0t1fs_mds_cob_unlink (struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
 
int m0t1fs_mds_cob_link (struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
 
int m0t1fs_mds_cob_lookup (struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
 
int m0t1fs_mds_cob_getattr (struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
 
int m0t1fs_mds_cob_setattr (struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
 
int m0t1fs_mds_cob_readdir (struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
 
int m0t1fs_mds_cob_setxattr (struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
 
int m0t1fs_mds_cob_getxattr (struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
 
int m0t1fs_mds_cob_listxattr (struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
 
int m0t1fs_mds_cob_delxattr (struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mo, struct m0_fop **rep_fop)
 
static int m0t1fs_ios_cob_fop_populate (struct m0t1fs_sb *csb, const struct m0t1fs_mdop *mop, struct m0_fop *fop, const struct m0_fid *cob_fid, const struct m0_fid *gob_fid, uint32_t cob_idx)
 
static void cfop_release (struct m0_ref *ref)
 
static int m0t1fs_ios_cob_op (struct cob_req *cr, const struct m0t1fs_inode *ci, const struct m0t1fs_mdop *mop, int idx, struct m0_fop_type *ftype)
 
M0_INTERNAL int m0t1fs_cob_getattr (struct inode *inode)
 
M0_INTERNAL int m0t1fs_cob_setattr (struct inode *inode, struct m0t1fs_mdop *mo)
 

Variables

const struct m0_uint128 m0_rm_m0t1fs_group
 
static const struct m0_rpc_item_ops cob_item_ops
 
int const char * name = handler->name
 
int const char const void * value
 
int const char const void size_t size
 
int const char const void size_t int flags
 
struct m0t1fs_sb * csb = M0T1FS_SB(ci->ci_inode.i_sb)
 
int layout_id
 
struct m0t1fs_mdop mo
 
int rc = m0t1fs_mds_cob_setxattr(csb, &mo, &rep_fop)
 
struct m0_foprep_fop = NULL
 
 M0_THREAD_ENTER
 
 else
 
out __pad0__
 
int const char void * buffer
 
struct m0_fop_getxattr_reprep = NULL
 
mo mo_attr ca_tfid = *m0t1fs_inode_fid(ci)
 
mo mo_attr ca_pver = ci->ci_pver
 
static int struct dentry * dentry = f->f_path.dentry
 
static int struct dentry int mode
 
static int struct dentry int struct nameidata * nd
 
struct m0t1fs_inode * ci = M0T1FS_I(inode)
 
struct inode * inode = NULL
 
struct m0_fid new_fid
 
struct m0_fid gfid
 
struct m0_pool_versionpv
 
bool i_err = false
 
inode i_ino = m0_fid_hash(&gfid)
 
ci ci_fid = gfid
 
inode i_mode = mode
 
inode i_uid = current_fsuid()
 
else inode i_gid = current_fsgid()
 
inode i_mtime = inode->i_atime = inode->i_ctime = current_time(inode)
 
inode i_blocks = 0
 
inode i_fop = &m0t1fs_reg_file_operations
 
inode i_mapping a_ops = &m0t1fs_aops
 
ci ci_pver = pv->pv_id
 
ci ci_layout_id = M0_DEFAULT_LAYOUT_ID
 
mo mo_attr ca_uid = from_kuid(current_user_ns(), inode->i_uid)
 
mo mo_attr ca_gid = from_kgid(current_user_ns(), inode->i_gid)
 
mo mo_attr ca_atime = inode->i_atime.tv_sec
 
mo mo_attr ca_ctime = inode->i_ctime.tv_sec
 
mo mo_attr ca_mtime = inode->i_mtime.tv_sec
 
mo mo_attr ca_mode = inode->i_mode
 
mo mo_attr ca_blocks = inode->i_blocks
 
mo mo_attr ca_pfid = *m0t1fs_inode_fid(M0T1FS_I(dir))
 
mo mo_attr ca_lid = ci->ci_layout_id
 
mo mo_attr ca_nlink = inode->i_nlink
 
mo mo_attr ca_valid
 
out __pad1__
 
void * err_ptr = NULL
 
bool dcache_splice = false
 
out __pad2__
 
m0_fid_tassumefid
 
static int void * buf
 
static int void filldir_t filldir
 
struct inodedir = dentry->d_inode
 
struct m0_direntent
 
struct m0t1fs_filedata * fd = f->private_data
 
int type
 
ino_t ino
 
int i = ctx->pos
 
int over
 
bool dot_filled = false
 
bool dotdot_filled = false
 
fd fd_direof = 1
 
out __pad3__
 
M0_INTERNAL int struct dentry struct kstat * stat
 
struct m0_fop_cobbody
 
const struct xattr_handler m0t1fs_xattr_lid
 
const struct xattr_handler m0t1fs_xattr_pver
 
const struct xattr_handler m0t1fs_xattr_writesize
 
static const struct xattr_handler m0t1fs_xattr_fid_lid
 
static const struct xattr_handler m0t1fs_xattr_fid_writesize
 
const struct xattr_handler * m0t1fs_xattr_handlers []
 
const struct file_operations m0t1fs_dir_file_operations
 
const struct file_operations m0t1fs_fid_dir_file_operations
 
const struct inode_operations m0t1fs_dir_inode_operations
 
const struct inode_operations m0t1fs_fid_dir_inode_operations
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_M0T1FS

Definition at line 31 of file dir.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Cob create/delete fop send deadline (in ns). Used to utilize rpc formation when too many fops are sending to one ioservice.

Enumerator
COB_REQ_DEADLINE 

Definition at line 56 of file dir.c.

Function Documentation

◆ body_mem2wire()

static void body_mem2wire ( struct m0_fop_cob body,
const struct m0_cob_attr attr,
int  valid 
)
static

Definition at line 158 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ body_wire2mem()

static void body_wire2mem ( struct m0_cob_attr attr,
const struct m0_fop_cob body 
)
static

Definition at line 191 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cfop_release()

static void cfop_release ( struct m0_ref ref)
static

Definition at line 2242 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cob_rpc_item_cb()

static void cob_rpc_item_cb ( struct m0_rpc_item item)
static

Definition at line 72 of file dir.c.

Here is the call graph for this function:

◆ d_instantiate()

d_instantiate ( dentry  ,
inode   
)
Here is the caller graph for this function:

◆ dirent_first()

struct m0_dirent* dirent_first ( struct m0_fop_readdir_rep rep)

Definition at line 947 of file dir.c.

◆ dirent_next()

struct m0_dirent* dirent_next ( struct m0_dirent ent)

Definition at line 937 of file dir.c.

◆ file_lock_acquire()

static int file_lock_acquire ( struct m0_rm_incoming rm_in,
struct m0t1fs_inode *  ci 
)
static

Definition at line 1730 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_lock_release()

static void file_lock_release ( struct m0_rm_incoming rm_in)
static

Definition at line 1749 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ if() [1/16]

if ( value  = NULL)

Definition at line 350 of file dir.c.

Here is the caller graph for this function:

◆ if() [2/16]

else if ( m0_streq(name, "writesize")  )

Definition at line 378 of file dir.c.

◆ if() [3/16]

if ( rc = 0)

TODO: Entry type is unknown and ino is pretty random, should be fixed later.

Todo:
When we have rm locking working, this will be changed to revalidate inode with checking cached lock. If lock is cached (not canceled), which means inode did not change, then we don't have to do getattr and can just use cached data.

Definition at line 468 of file dir.c.

◆ if() [4/16]

if ( m0_streq(name, "lid")  )

Definition at line 485 of file dir.c.

Here is the call graph for this function:

◆ if() [5/16]

if ( csb->  csb_oostore)

Definition at line 501 of file dir.c.

Here is the call graph for this function:

◆ if() [6/16]

else if ( rc  = = 0)

Definition at line 514 of file dir.c.

Here is the call graph for this function:

◆ if() [7/16]

if ( dir->i_mode S_ISGID)

Definition at line 676 of file dir.c.

◆ if() [8/16]

if ( S_ISDIR(mode )

Definition at line 688 of file dir.c.

◆ if() [9/16]

if ( !csb->  csb_oostore)

Definition at line 736 of file dir.c.

Here is the call graph for this function:

◆ if() [10/16]

if ( S_ISREG(mode) &&csb->  csb_oostore)

Definition at line 743 of file dir.c.

Here is the call graph for this function:

◆ if() [11/16]

if ( )

Definition at line 751 of file dir.c.

Here is the call graph for this function:

◆ if() [12/16]

if ( i_err  )

Definition at line 768 of file dir.c.

◆ if() [13/16]

if ( dentry->d_name.  len,
csb->  csb_namelen 
)

Definition at line 824 of file dir.c.

Here is the call graph for this function:

◆ if() [14/16]

if ( IS_ERR(inode )

Definition at line 891 of file dir.c.

Here is the call graph for this function:

◆ if() [15/16]

if ( fd->  fd_direof)

◆ if() [16/16]

if ( ++fd->fd_mds_index< csb->csb_pools_common.  pc_nr_svcs[M0_CST_MDS])

Definition at line 1165 of file dir.c.

Here is the call graph for this function:

◆ M0_ADDB2_ADD()

M0_ADDB2_ADD ( M0_AVI_FS_CREATE  ,
new_fid.  f_container,
new_fid.  f_key,
mode  ,
rc   
)

◆ m0_addb2_add()

m0_addb2_add ( M0_AVI_FS_LOOKUP  ,
M0_ADDB2_OBJ(&dir ->  ci_fid 
)

◆ M0_ENTRY() [1/2]

M0_ENTRY ( )
Here is the caller graph for this function:

◆ M0_ENTRY() [2/2]

M0_ENTRY ( "Getting %.*s's xattr %s ,
dentry->d_name.  len,
(char *) dentry->d_name.  name,
name   
)

◆ M0_ERR()

return M0_ERR ( EOPNOTSUPP)

◆ m0_fop_put0_lock()

m0_fop_put0_lock ( rep_fop  )
Here is the caller graph for this function:

◆ M0_LEAVE()

M0_LEAVE ( )

◆ M0_LOG() [1/4]

M0_LOG ( M0_DEBUG  ,
"Creating \n pdir %lu "  FID_F,
(char *) dentry->d_name.  name,
dir->  i_ino,
FID_P(m0t1fs_inode_fid(M0T1FS_I(dir)))   
)
Here is the caller graph for this function:

◆ M0_LOG() [2/4]

M0_LOG ( M0_DEBUG  )

◆ M0_LOG() [3/4]

M0_LOG ( M0_INFO  ,
"Creating \ith pool version "  FID_F,
(char *) dentry->d_name.  name,
FID_P &->  ci_pver 
)

◆ M0_LOG() [4/4]

M0_LOG ( M0_INFO  ,
"Name: \  ,
(char *) dentry->d_name.  name 
)

◆ M0_RC()

return M0_RC ( rc  )

◆ m0t1fs_cob_getattr()

M0_INTERNAL int m0t1fs_cob_getattr ( struct inode inode)

Definition at line 2386 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_cob_setattr()

M0_INTERNAL int m0t1fs_cob_setattr ( struct inode inode,
struct m0t1fs_mdop *  mo 
)

Definition at line 2477 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_component_objects_op()

static int m0t1fs_component_objects_op ( struct m0t1fs_inode *  ci,
struct m0t1fs_mdop *  mop,
int(*)(struct cob_req *, const struct m0t1fs_inode *, const struct m0t1fs_mdop *, int idx)  func 
)
static

Definition at line 1755 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_create() [1/2]

static int m0t1fs_create ( struct inode dir,
struct dentry dentry,
umode_t  mode,
bool  excl 
)
static

◆ m0t1fs_create() [2/2]

return m0t1fs_create ( dir  ,
dentry  ,
mode S_IFDIR,
NULL   
)

◆ m0t1fs_fid_accept()

void m0t1fs_fid_accept ( struct m0t1fs_sb *  csb,
const struct m0_fid fid 
)

Given a fid of an existing file, update "fid allocator" so that this fid is not given out to another file.

Definition at line 265 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_fid_alloc()

void m0t1fs_fid_alloc ( struct m0t1fs_sb *  csb,
struct m0_fid out 
)

Allocate fid of global file.

See "Containers and component objects" section in m0t1fs.h for more information.

XXX temporary.

Definition at line 252 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_fid_check()

static int m0t1fs_fid_check ( struct m0_fid fid)
static

Definition at line 597 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_fid_create() [1/2]

static int m0t1fs_fid_create ( struct inode dir,
struct dentry dentry,
umode_t  mode,
bool  excl 
)
static

◆ m0t1fs_fid_create() [2/2]

return m0t1fs_fid_create ( dir  ,
dentry  ,
mode S_IFDIR,
NULL   
)

◆ m0t1fs_fid_getattr()

M0_INTERNAL int m0t1fs_fid_getattr ( const struct path *  path,
struct kstat *  stat,
uint32_t  request_mask,
uint32_t  query_flags 
)

◆ m0t1fs_fid_getxattr()

int m0t1fs_fid_getxattr ( const struct xattr_handler *  handler,
struct dentry dentry,
struct inode inode,
const char *  name,
void *  buffer,
size_t  size 
)

◆ m0t1fs_fid_link()

static int m0t1fs_fid_link ( struct dentry old,
struct inode dir,
struct dentry new 
)
static

Definition at line 1183 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_fid_lookup()

return dcache_splice static d_splice_alias (inode, dentry) struct dentry* m0t1fs_fid_lookup ( struct inode dir,
struct dentry dentry,
unsigned int  flags 
)
static

◆ m0t1fs_fid_mkdir()

static int m0t1fs_fid_mkdir ( struct inode dir,
struct dentry dentry,
umode_t  mode 
)
static

◆ m0t1fs_fid_opendir()

static int m0t1fs_fid_opendir ( struct inode inode,
struct file file 
)
static

Definition at line 976 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_fid_readdir() [1/2]

static int m0t1fs_fid_readdir ( struct file f,
struct dir_context *  ctx 
)
static

Definition at line 1000 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_fid_readdir() [2/2]

static int m0t1fs_fid_readdir ( struct file f,
void *  buf,
filldir_t  filldir 
)
static

Definition at line 1006 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_fid_releasedir()

static int m0t1fs_fid_releasedir ( struct inode inode,
struct file file 
)
static

Definition at line 993 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_fid_removexattr()

int m0t1fs_fid_removexattr ( struct dentry dentry,
const char *  name 
)

Definition at line 544 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_fid_rmdir()

static int m0t1fs_fid_rmdir ( struct inode dir,
struct dentry dentry 
)
static

Definition at line 1368 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_fid_setxattr()

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 
)

◆ m0t1fs_fid_unlink()

static int m0t1fs_fid_unlink ( struct inode dir,
struct dentry dentry 
)
static

Definition at line 1247 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_file_lock_init()

m0t1fs_file_lock_init ( ci  ,
csb   
)
Here is the caller graph for this function:

◆ m0t1fs_fs_conf_lock()

M0_INTERNAL int m0t1fs_fs_conf_lock ( struct m0t1fs_sb *  csb)

Definition at line 227 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_fs_conf_unlock() [1/2]

M0_INTERNAL void m0t1fs_fs_conf_unlock ( struct m0t1fs_sb *  csb)

Definition at line 239 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_fs_conf_unlock() [2/2]

m0t1fs_fs_conf_unlock ( csb  )

◆ m0t1fs_getxattr()

int m0t1fs_getxattr ( const struct xattr_handler *  handler,
struct dentry dentry,
struct inode inode,
const char *  name,
void *  buffer,
size_t  size 
)

◆ m0t1fs_inode_bob_check()

M0_INTERNAL bool m0t1fs_inode_bob_check ( struct m0t1fs_inode *  bob)
Here is the caller graph for this function:

◆ m0t1fs_inode_bob_init()

M0_INTERNAL void m0t1fs_inode_bob_init ( struct m0t1fs_inode *  bob)
Here is the caller graph for this function:

◆ m0t1fs_inode_set_layout_id()

int m0t1fs_inode_set_layout_id ( struct m0t1fs_inode *  ci,
struct m0t1fs_mdop *  mo,
int  layout_id 
)

Definition at line 272 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_inode_update_stat()

static int m0t1fs_inode_update_stat ( struct inode inode,
struct m0_fop_cob body,
struct kstat *  stat 
)
static

Now its time to return inode stat data to user.

Definition at line 1388 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_ios_cob_create()

static int m0t1fs_ios_cob_create ( struct cob_req cr,
const struct m0t1fs_inode *  inode,
const struct m0t1fs_mdop *  mop,
int  idx 
)
static

Definition at line 2353 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_ios_cob_delete()

static int m0t1fs_ios_cob_delete ( struct cob_req cr,
const struct m0t1fs_inode *  inode,
const struct m0t1fs_mdop *  mop,
int  idx 
)
static

Definition at line 2361 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_ios_cob_fop_populate()

static int m0t1fs_ios_cob_fop_populate ( struct m0t1fs_sb *  csb,
const struct m0t1fs_mdop *  mop,
struct m0_fop fop,
const struct m0_fid cob_fid,
const struct m0_fid gob_fid,
uint32_t  cob_idx 
)
static

Definition at line 2203 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_ios_cob_op()

static int m0t1fs_ios_cob_op ( struct cob_req cr,
const struct m0t1fs_inode *  ci,
const struct m0t1fs_mdop *  mop,
int  idx,
struct m0_fop_type ftype 
)
static

Definition at line 2264 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_ios_cob_setattr()

static int m0t1fs_ios_cob_setattr ( struct cob_req cr,
const struct m0t1fs_inode *  inode,
const struct m0t1fs_mdop *  mop,
int  idx 
)
static

Definition at line 2378 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_ios_cob_truncate()

static int m0t1fs_ios_cob_truncate ( struct cob_req cr,
const struct m0t1fs_inode *  inode,
const struct m0t1fs_mdop *  mop,
int  idx 
)
static

Definition at line 2369 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_link()

static int m0t1fs_link ( struct dentry old,
struct inode dir,
struct dentry new 
)
static

Definition at line 1190 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_listxattr()

ssize_t m0t1fs_listxattr ( struct dentry dentry,
char *  buffer,
size_t  size 
)

Definition at line 538 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_lookup() [1/3]

static struct dentry* m0t1fs_lookup ( struct inode dir,
struct dentry dentry,
unsigned int  flags 
)
static

◆ m0t1fs_lookup() [2/3]

return m0t1fs_lookup ( dir  ,
dentry  ,
flags   
)

◆ m0t1fs_lookup() [3/3]

return m0t1fs_lookup ( dir  ,
dentry  ,
nd   
)

◆ m0t1fs_mds_cob_create()

int m0t1fs_mds_cob_create ( struct m0t1fs_sb *  csb,
const struct m0t1fs_mdop *  mo,
struct m0_fop **  rep_fop 
)

Definition at line 2126 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_mds_cob_delxattr()

int m0t1fs_mds_cob_delxattr ( struct m0t1fs_sb *  csb,
const struct m0t1fs_mdop *  mo,
struct m0_fop **  rep_fop 
)

Definition at line 2196 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_mds_cob_fop_populate()

static int m0t1fs_mds_cob_fop_populate ( struct m0t1fs_sb *  csb,
const struct m0t1fs_mdop *  mo,
struct m0_fop fop 
)
static

Definition at line 1833 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_mds_cob_getattr()

int m0t1fs_mds_cob_getattr ( struct m0t1fs_sb *  csb,
const struct m0t1fs_mdop *  mo,
struct m0_fop **  rep_fop 
)

Definition at line 2154 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_mds_cob_getxattr()

int m0t1fs_mds_cob_getxattr ( struct m0t1fs_sb *  csb,
const struct m0t1fs_mdop *  mo,
struct m0_fop **  rep_fop 
)

Definition at line 2182 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_mds_cob_link()

int m0t1fs_mds_cob_link ( struct m0t1fs_sb *  csb,
const struct m0t1fs_mdop *  mo,
struct m0_fop **  rep_fop 
)

Definition at line 2140 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_mds_cob_listxattr()

int m0t1fs_mds_cob_listxattr ( struct m0t1fs_sb *  csb,
const struct m0t1fs_mdop *  mo,
struct m0_fop **  rep_fop 
)

Definition at line 2189 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_mds_cob_lookup()

int m0t1fs_mds_cob_lookup ( struct m0t1fs_sb *  csb,
const struct m0t1fs_mdop *  mo,
struct m0_fop **  rep_fop 
)

Definition at line 2147 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_mds_cob_op()

static int m0t1fs_mds_cob_op ( struct m0t1fs_sb *  csb,
const struct m0t1fs_mdop *  mo,
struct m0_fop_type ftype,
struct m0_fop **  rep_fop 
)
static
Todo:
remid can be found generically, outside of this switch through the use of 'm0_xcode_find()' - this function should be cleaned up later.

Definition at line 1949 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_mds_cob_readdir()

int m0t1fs_mds_cob_readdir ( struct m0t1fs_sb *  csb,
const struct m0t1fs_mdop *  mo,
struct m0_fop **  rep_fop 
)

Definition at line 2168 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_mds_cob_setattr()

int m0t1fs_mds_cob_setattr ( struct m0t1fs_sb *  csb,
const struct m0t1fs_mdop *  mo,
struct m0_fop **  rep_fop 
)

Definition at line 2161 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_mds_cob_setxattr()

int m0t1fs_mds_cob_setxattr ( struct m0t1fs_sb *  csb,
const struct m0t1fs_mdop *  mo,
struct m0_fop **  rep_fop 
)

Definition at line 2175 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_mds_cob_unlink()

int m0t1fs_mds_cob_unlink ( struct m0t1fs_sb *  csb,
const struct m0t1fs_mdop *  mo,
struct m0_fop **  rep_fop 
)

Definition at line 2133 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_mds_statfs()

int m0t1fs_mds_statfs ( struct m0t1fs_sb *  csb,
struct m0_fop **  rep_fop 
)

Definition at line 2119 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_mkdir()

static int m0t1fs_mkdir ( struct inode dir,
struct dentry dentry,
umode_t  mode 
)
static

◆ m0t1fs_opendir()

static int m0t1fs_opendir ( struct inode inode,
struct file file 
)
static

Setup readdir initial pos with "." and max possible namelen.

Definition at line 953 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_readdir()

static int m0t1fs_readdir ( struct file f,
struct dir_context *  ctx 
)
static

◆ m0t1fs_releasedir()

static int m0t1fs_releasedir ( struct inode inode,
struct file file 
)
static

Definition at line 982 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_removexattr()

int m0t1fs_removexattr ( struct dentry dentry,
const char *  name 
)

Definition at line 550 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_rmdir()

static int m0t1fs_rmdir ( struct inode dir,
struct dentry dentry 
)
static

Definition at line 1374 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_setattr()

M0_INTERNAL int m0t1fs_setattr ( struct dentry dentry,
struct iattr *  attr 
)

Definition at line 1586 of file dir.c.

Here is the call graph for this function:

◆ m0t1fs_setxattr()

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 
)

◆ m0t1fs_size_update()

M0_INTERNAL int m0t1fs_size_update ( struct dentry dentry,
uint64_t  newsize 
)

Definition at line 1525 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_unlink()

static int m0t1fs_unlink ( struct inode dir,
struct dentry dentry 
)
static

Update ctime and mtime on parent dir.

Definition at line 1253 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mark_inode_dirty()

mark_inode_dirty ( dir  )
Here is the caller graph for this function:

◆ mo() [1/2]

m0_buf_init& mo ( void *  )

◆ mo() [2/2]

m0_buf_init& mo ( char *  ) -> d_name.name, dentry->d_name.len

◆ name_mem2wire()

static int name_mem2wire ( struct m0_fop_str tgt,
const struct m0_buf name 
)
static

Definition at line 147 of file dir.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unlock_new_inode()

unlock_new_inode ( inode  )
Here is the caller graph for this function:

◆ while()

while ( rc  = =0)
Here is the caller graph for this function:

Variable Documentation

◆ __pad0__

out __pad0__

Definition at line 424 of file dir.c.

◆ __pad1__

out __pad1__

Definition at line 766 of file dir.c.

◆ __pad2__

out __pad2__

Definition at line 898 of file dir.c.

◆ __pad3__

out __pad3__

Definition at line 1178 of file dir.c.

◆ a_ops

inode i_mapping a_ops = &m0t1fs_aops

Definition at line 695 of file dir.c.

◆ body

struct m0_fop_cob* body

Definition at line 1436 of file dir.c.

◆ buf

int void* buf

Definition at line 1019 of file dir.c.

◆ buffer

int const char void * buffer

Definition at line 435 of file dir.c.

◆ ca_atime

mo mo_attr ca_atime = inode->i_atime.tv_sec

Definition at line 719 of file dir.c.

◆ ca_blocks

mo mo_attr ca_blocks = inode->i_blocks

Definition at line 723 of file dir.c.

◆ ca_ctime

mo mo_attr ca_ctime = inode->i_ctime.tv_sec

Definition at line 720 of file dir.c.

◆ ca_gid

mo mo_attr ca_gid = from_kgid(current_user_ns(), inode->i_gid)

Definition at line 714 of file dir.c.

◆ ca_lid

mo mo_attr ca_lid = ci->ci_layout_id

Definition at line 727 of file dir.c.

◆ ca_mode

mo mo_attr ca_mode = inode->i_mode

Definition at line 722 of file dir.c.

◆ ca_mtime

mo mo_attr ca_mtime = inode->i_mtime.tv_sec

Definition at line 721 of file dir.c.

◆ ca_nlink

mo mo_attr ca_nlink = inode->i_nlink

Definition at line 728 of file dir.c.

◆ ca_pfid

mo mo_attr ca_pfid = *m0t1fs_inode_fid(M0T1FS_I(dir))

Definition at line 724 of file dir.c.

◆ ca_pver

mo mo_attr ca_pver = ci->ci_pver

Definition at line 511 of file dir.c.

◆ ca_tfid

mo mo_attr ca_tfid = *m0t1fs_inode_fid(ci)

Definition at line 507 of file dir.c.

◆ ca_uid

mo mo_attr ca_uid = from_kuid(current_user_ns(), inode->i_uid)

Definition at line 713 of file dir.c.

◆ ca_valid

mo mo_attr ca_valid

◆ ci

ci = M0T1FS_I(inode)

Definition at line 622 of file dir.c.

◆ ci_fid

ci ci_fid = gfid

Definition at line 672 of file dir.c.

◆ ci_layout_id

ci ci_layout_id = M0_DEFAULT_LAYOUT_ID

Definition at line 702 of file dir.c.

◆ ci_pver

ci ci_pver = pv->pv_id

Definition at line 698 of file dir.c.

◆ cob_item_ops

const struct m0_rpc_item_ops cob_item_ops
static
Initial value:
= {
.rio_replied = cob_rpc_item_cb,
}
static void cob_rpc_item_cb(struct m0_rpc_item *item)
Definition: dir.c:72

Definition at line 110 of file dir.c.

◆ csb

struct m0t1fs_sb * csb = M0T1FS_SB(ci->ci_inode.i_sb)

Definition at line 330 of file dir.c.

◆ dcache_splice

dcache_splice = false

Definition at line 815 of file dir.c.

◆ dentry

struct dentry * dentry = f->f_path.dentry

Definition at line 589 of file dir.c.

◆ dir

dir = dentry->d_inode

Definition at line 1028 of file dir.c.

◆ dot_filled

bool dot_filled = false

Definition at line 1036 of file dir.c.

◆ dotdot_filled

bool dotdot_filled = false

Definition at line 1037 of file dir.c.

◆ else

else
Initial value:
{
if (csb->csb_oostore) {
rc = -EOPNOTSUPP;
goto out;
}
m0_buf_init(&mo.mo_attr.ca_eakey, (void*)name, strlen(name))
int const char * name
Definition: dir.c:325
M0_INTERNAL void m0_buf_init(struct m0_buf *buf, void *data, uint32_t nob)
Definition: buf.c:37
struct m0t1fs_sb * csb
Definition: dir.c:330
int rc
Definition: dir.c:333
struct m0t1fs_mdop mo
Definition: dir.c:332
#define out(...)
Definition: gen.c:41

Definition at line 413 of file dir.c.

◆ ent

struct m0_dirent* ent

Definition at line 1029 of file dir.c.

◆ err_ptr

void* err_ptr = NULL

Definition at line 813 of file dir.c.

◆ fd

fd = f->private_data

Definition at line 1030 of file dir.c.

◆ fd_direof

fd fd_direof = 1

Definition at line 1174 of file dir.c.

◆ fid

Definition at line 928 of file dir.c.

◆ filldir

int void filldir_t filldir
Initial value:
{
struct m0t1fs_inode *ci
struct m0t1fs_inode * ci
Definition: dir.c:622

Definition at line 1022 of file dir.c.

◆ flags

M0_INTERNAL int const char const void size_t int flags
Initial value:
{
struct m0t1fs_inode *ci = M0T1FS_I(dentry->d_inode)
static int struct dentry * dentry
Definition: dir.c:589
struct m0t1fs_inode * ci
Definition: dir.c:622

Definition at line 328 of file dir.c.

◆ gfid

Definition at line 626 of file dir.c.

◆ i

i = ctx->pos

Definition at line 1033 of file dir.c.

◆ i_blocks

inode i_blocks = 0

Definition at line 687 of file dir.c.

◆ i_err

bool i_err = false

Definition at line 630 of file dir.c.

◆ i_fop

Definition at line 694 of file dir.c.

◆ i_gid

else inode i_gid = current_fsgid()

Definition at line 681 of file dir.c.

◆ i_ino

inode i_ino = m0_fid_hash(&gfid)

Definition at line 670 of file dir.c.

◆ i_mode

inode i_mode = mode

Definition at line 674 of file dir.c.

◆ i_mtime

inode i_mtime = inode->i_atime = inode->i_ctime = current_time(inode)

Definition at line 683 of file dir.c.

◆ i_uid

inode i_uid = current_fsuid()

Definition at line 675 of file dir.c.

◆ ino

ino_t ino

Definition at line 1032 of file dir.c.

◆ inode

struct inode * inode = NULL

Definition at line 624 of file dir.c.

◆ layout_id

int layout_id

Definition at line 331 of file dir.c.

◆ m0_rm_m0t1fs_group

const struct m0_uint128 m0_rm_m0t1fs_group

Definition at line 59 of file inode.c.

◆ M0_THREAD_ENTER

M0_THREAD_ENTER

Definition at line 336 of file dir.c.

◆ m0t1fs_dir_file_operations

const struct file_operations m0t1fs_dir_file_operations
Initial value:
= {
.read = generic_read_dir,
.open = m0t1fs_opendir,
.release = m0t1fs_releasedir,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
.iterate = m0t1fs_readdir,
#else
.readdir = m0t1fs_readdir,
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
.fsync = generic_file_fsync,
#else
.fsync = simple_fsync,
#endif
.llseek = generic_file_llseek,
}
static int m0t1fs_releasedir(struct inode *inode, struct file *file)
Definition: dir.c:982
static int m0t1fs_readdir(struct file *f, struct dir_context *ctx) static int m0t1fs_readdir(struct file *f
static int m0t1fs_opendir(struct inode *inode, struct file *file)
Definition: dir.c:953

Definition at line 2539 of file dir.c.

◆ m0t1fs_dir_inode_operations

const struct inode_operations m0t1fs_dir_inode_operations
Initial value:
= {
.create = m0t1fs_create,
.lookup = m0t1fs_lookup,
.unlink = m0t1fs_unlink,
.link = m0t1fs_link,
.mkdir = m0t1fs_mkdir,
.rmdir = m0t1fs_rmdir,
.setattr = m0t1fs_setattr,
.getattr = m0t1fs_getattr,
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,9,0)
.setxattr = m0t1fs_setxattr,
.getxattr = m0t1fs_getxattr,
.removexattr = m0t1fs_removexattr,
#endif
.listxattr = m0t1fs_listxattr,
}
ssize_t m0t1fs_listxattr(struct dentry *dentry, char *buffer, size_t size)
Definition: dir.c:538
int m0t1fs_removexattr(struct dentry *dentry, const char *name)
Definition: dir.c:550
static int m0t1fs_rmdir(struct inode *dir, struct dentry *dentry)
Definition: dir.c:1374
static int m0t1fs_link(struct dentry *old, struct inode *dir, struct dentry *new)
Definition: dir.c:1190
static int m0t1fs_unlink(struct inode *dir, struct dentry *dentry)
Definition: dir.c:1253
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
static struct dentry * m0t1fs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) static struct dentry *m0t1fs_lookup(struct inode *dir
M0_INTERNAL int m0t1fs_setattr(struct dentry *dentry, struct iattr *attr)
Definition: dir.c:1586
static int m0t1fs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) static int m0t1fs_mkdir(struct inode *dir
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
static int m0t1fs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl) static int m0t1fs_create(struct inode *dir

Definition at line 2574 of file dir.c.

◆ m0t1fs_fid_dir_file_operations

const struct file_operations m0t1fs_fid_dir_file_operations
Initial value:
= {
.read = generic_read_dir,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
.iterate = m0t1fs_fid_readdir,
#else
.readdir = m0t1fs_fid_readdir,
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
.fsync = generic_file_fsync,
#else
.fsync = simple_fsync,
#endif
.llseek = generic_file_llseek,
}
static int m0t1fs_fid_releasedir(struct inode *inode, struct file *file)
Definition: dir.c:993
static int m0t1fs_fid_opendir(struct inode *inode, struct file *file)
Definition: dir.c:976
static int m0t1fs_fid_readdir(struct file *f, struct dir_context *ctx)
Definition: dir.c:1000

Definition at line 2557 of file dir.c.

◆ m0t1fs_fid_dir_inode_operations

const struct inode_operations m0t1fs_fid_dir_inode_operations
Initial value:
= {
.create = m0t1fs_fid_create,
.lookup = m0t1fs_fid_lookup,
.unlink = m0t1fs_fid_unlink,
.link = m0t1fs_fid_link,
.mkdir = m0t1fs_fid_mkdir,
.rmdir = m0t1fs_fid_rmdir,
.setattr = m0t1fs_fid_setattr,
.getattr = m0t1fs_fid_getattr,
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,9,0)
.setxattr = m0t1fs_fid_setxattr,
.getxattr = m0t1fs_fid_getxattr,
.removexattr = m0t1fs_fid_removexattr,
#endif
.listxattr = m0t1fs_fid_listxattr,
}
static int m0t1fs_fid_link(struct dentry *old, struct inode *dir, struct dentry *new)
Definition: dir.c:1183
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 int m0t1fs_fid_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl) static int m0t1fs_fid_create(struct inode *dir
static int m0t1fs_fid_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) static int m0t1fs_fid_mkdir(struct inode *dir
return dcache_splice static d_splice_alias(inode, dentry) struct dentry * m0t1fs_fid_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) static struct dentry *m0t1fs_fid_lookup(struct inode *dir
int m0t1fs_fid_removexattr(struct dentry *dentry, const char *name)
Definition: dir.c:544
static int m0t1fs_fid_rmdir(struct inode *dir, struct dentry *dentry)
Definition: dir.c:1368
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
static int m0t1fs_fid_unlink(struct inode *dir, struct dentry *dentry)
Definition: dir.c:1247
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

Definition at line 2592 of file dir.c.

◆ m0t1fs_xattr_fid_lid

const struct xattr_handler m0t1fs_xattr_fid_lid
static
Initial value:
= {
.name = "fid_lid",
.flags = 0,
}
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
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

Definition at line 2515 of file dir.c.

◆ m0t1fs_xattr_fid_writesize

const struct xattr_handler m0t1fs_xattr_fid_writesize
static
Initial value:
= {
.name = "fid_writesize",
.flags = 0,
}
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
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

Definition at line 2522 of file dir.c.

◆ m0t1fs_xattr_handlers

const struct xattr_handler* m0t1fs_xattr_handlers[]
Initial value:
= {
}
const struct xattr_handler m0t1fs_xattr_lid
Definition: dir.c:2496
#define NULL
Definition: misc.h:38
static const struct xattr_handler m0t1fs_xattr_fid_writesize
Definition: dir.c:2522
const struct xattr_handler m0t1fs_xattr_pver
Definition: dir.c:2503
static const struct xattr_handler m0t1fs_xattr_fid_lid
Definition: dir.c:2515
const struct xattr_handler m0t1fs_xattr_writesize
Definition: dir.c:2509

Definition at line 2529 of file dir.c.

◆ m0t1fs_xattr_lid

const struct xattr_handler m0t1fs_xattr_lid
Initial value:
= {
.name = "lid",
.flags = 0,
}
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 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

Definition at line 2496 of file dir.c.

◆ m0t1fs_xattr_pver

const struct xattr_handler m0t1fs_xattr_pver
Initial value:
= {
.name = "pver",
.flags = 0,
}
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

Definition at line 2503 of file dir.c.

◆ m0t1fs_xattr_writesize

const struct xattr_handler m0t1fs_xattr_writesize
Initial value:
= {
.name = "writesize",
.flags = 0,
}
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 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

Definition at line 2509 of file dir.c.

◆ mo

struct m0t1fs_mdop mo

Definition at line 332 of file dir.c.

◆ mode

static int struct dentry int mode
Initial value:
{
M0_THREAD_ENTER
Definition: dir.c:336

Definition at line 589 of file dir.c.

◆ name

M0_INTERNAL int const char* name = handler->name

Definition at line 325 of file dir.c.

◆ nd

static struct dentry struct dentry struct nameidata * nd
Initial value:
{
return M0_ERR(-EOPNOTSUPP)
return M0_ERR(-EOPNOTSUPP)

Definition at line 593 of file dir.c.

◆ new_fid

struct m0_fid new_fid

Definition at line 625 of file dir.c.

◆ over

int over

Definition at line 1035 of file dir.c.

◆ pv

struct m0_pool_version* pv

Definition at line 629 of file dir.c.

◆ rc

Definition at line 333 of file dir.c.

◆ rep

struct m0_fop_readdir_rep * rep = NULL

Definition at line 455 of file dir.c.

◆ rep_fop

struct m0_fop * rep_fop = NULL

Definition at line 334 of file dir.c.

◆ size

M0_INTERNAL int const char const void size_t size
Initial value:
{
M0_THREAD_ENTER
Definition: dir.c:336

Definition at line 325 of file dir.c.

◆ stat

M0_INTERNAL int struct dentry struct kstat* stat
Initial value:
{
struct m0t1fs_sb *csb
struct m0t1fs_sb * csb
Definition: dir.c:330

Definition at line 1433 of file dir.c.

◆ type

int type

Definition at line 1031 of file dir.c.

◆ value

M0_INTERNAL int const char const void * value

Definition at line 325 of file dir.c.