linux/fs/sysv/sysv.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _SYSV_H
#define _SYSV_H

#include <linux/buffer_head.h>

__fs16;
__fs32;

#include <linux/sysv_fs.h>

/*
 * SystemV/V7/Coherent super-block data in memory
 *
 * The SystemV/V7/Coherent superblock contains dynamic data (it gets modified
 * while the system is running). This is in contrast to the Minix and Berkeley
 * filesystems (where the superblock is never modified). This affects the
 * sync() operation: we must keep the superblock in a disk buffer and use this
 * one as our "working copy".
 */

struct sysv_sb_info {};

/*
 * SystemV/V7/Coherent FS inode data in memory
 */
struct sysv_inode_info {};


static inline struct sysv_inode_info *SYSV_I(struct inode *inode)
{}

static inline struct sysv_sb_info *SYSV_SB(struct super_block *sb)
{}


/* identify the FS in memory */
enum {};

#define SYSV_MAGIC_BASE

#define XENIX_SUPER_MAGIC
#define SYSV4_SUPER_MAGIC
#define SYSV2_SUPER_MAGIC
#define COH_SUPER_MAGIC


/* Admissible values for i_nlink: 0.._LINK_MAX */
enum {};


static inline void dirty_sb(struct super_block *sb)
{}


/* ialloc.c */
extern struct sysv_inode *sysv_raw_inode(struct super_block *, unsigned,
			struct buffer_head **);
extern struct inode * sysv_new_inode(const struct inode *, umode_t);
extern void sysv_free_inode(struct inode *);
extern unsigned long sysv_count_free_inodes(struct super_block *);

/* balloc.c */
extern sysv_zone_t sysv_new_block(struct super_block *);
extern void sysv_free_block(struct super_block *, sysv_zone_t);
extern unsigned long sysv_count_free_blocks(struct super_block *);

/* itree.c */
void sysv_truncate(struct inode *);
int sysv_prepare_chunk(struct folio *folio, loff_t pos, unsigned len);

/* inode.c */
extern struct inode *sysv_iget(struct super_block *, unsigned int);
extern int sysv_write_inode(struct inode *, struct writeback_control *wbc);
extern int sysv_sync_inode(struct inode *);
extern void sysv_set_inode(struct inode *, dev_t);
extern int sysv_getattr(struct mnt_idmap *, const struct path *,
			struct kstat *, u32, unsigned int);
extern int sysv_init_icache(void);
extern void sysv_destroy_icache(void);


/* dir.c */
struct sysv_dir_entry *sysv_find_entry(struct dentry *, struct folio **);
int sysv_add_link(struct dentry *, struct inode *);
int sysv_delete_entry(struct sysv_dir_entry *, struct folio *);
int sysv_make_empty(struct inode *, struct inode *);
int sysv_empty_dir(struct inode *);
int sysv_set_link(struct sysv_dir_entry *, struct folio *,
			struct inode *);
struct sysv_dir_entry *sysv_dotdot(struct inode *, struct folio **);
ino_t sysv_inode_by_name(struct dentry *);


extern const struct inode_operations sysv_file_inode_operations;
extern const struct inode_operations sysv_dir_inode_operations;
extern const struct file_operations sysv_file_operations;
extern const struct file_operations sysv_dir_operations;
extern const struct address_space_operations sysv_aops;
extern const struct super_operations sysv_sops;


enum {};

static inline u32 PDP_swab(u32 x)
{}

static inline __u32 fs32_to_cpu(struct sysv_sb_info *sbi, __fs32 n)
{}

static inline __fs32 cpu_to_fs32(struct sysv_sb_info *sbi, __u32 n)
{}

static inline __fs32 fs32_add(struct sysv_sb_info *sbi, __fs32 *n, int d)
{}

static inline __u16 fs16_to_cpu(struct sysv_sb_info *sbi, __fs16 n)
{}

static inline __fs16 cpu_to_fs16(struct sysv_sb_info *sbi, __u16 n)
{}

static inline __fs16 fs16_add(struct sysv_sb_info *sbi, __fs16 *n, int d)
{}

#endif /* _SYSV_H */