mirror of
https://github.com/versity/scoutfs.git
synced 2026-07-23 16:43:17 +00:00
Now that we've removed the hash and pos from the dentry_info struct we can do without it. We can store the refresh gen in the d_fsdsta pointer (sorry, 64bit only for now.. could allocate if we needed to.) This gets rid of the lock coverage spinlocks and puts a bit more pressure on lock lookup, which we already know we have to make more efficient. We can get rid of all the dentry info allocation calls. Now that we're not setting d_op as we allocate d_fsdata we put the ops on the super block so that we get d_revalidate called on all our dentries. We also are a bit more precise about the errors we can return from verification. If the target of a dentry link changes then we return -ESTALE rather than silently performing the caller's operation on another inode. Signed-off-by: Zach Brown <zab@versity.com>
35 lines
972 B
C
35 lines
972 B
C
#ifndef _SCOUTFS_DIR_H_
|
|
#define _SCOUTFS_DIR_H_
|
|
|
|
#include "format.h"
|
|
#include "lock.h"
|
|
|
|
extern const struct file_operations scoutfs_dir_fops;
|
|
extern const struct inode_operations_wrapper scoutfs_dir_iops;
|
|
extern const struct inode_operations scoutfs_symlink_iops;
|
|
|
|
extern const struct dentry_operations scoutfs_dentry_ops;
|
|
|
|
struct scoutfs_link_backref_entry {
|
|
struct list_head head;
|
|
u64 dir_ino;
|
|
u64 dir_pos;
|
|
u16 name_len;
|
|
struct scoutfs_dirent dent;
|
|
/* the full name is allocated and stored in dent.name[] */
|
|
};
|
|
|
|
int scoutfs_dir_get_backref_path(struct super_block *sb, u64 ino, u64 dir_ino,
|
|
u64 dir_pos, struct list_head *list);
|
|
void scoutfs_dir_free_backref_path(struct super_block *sb,
|
|
struct list_head *list);
|
|
|
|
int scoutfs_dir_add_next_linkref(struct super_block *sb, u64 ino,
|
|
u64 dir_ino, u64 dir_pos,
|
|
struct list_head *list);
|
|
|
|
int scoutfs_symlink_drop(struct super_block *sb, u64 ino,
|
|
struct scoutfs_lock *lock, u64 i_size);
|
|
|
|
#endif
|