#include <linux/uaccess.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/time.h>
#include <linux/stat.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/buffer_head.h>
#include <linux/mpage.h>
#include <linux/writeback.h>
#include <linux/iversion.h>
#include "ufs_fs.h"
#include "ufs.h"
#include "swab.h"
#include "util.h"
static int ufs_block_to_path(struct inode *inode, sector_t i_block, unsigned offsets[4])
{ … }
Indirect;
static inline int grow_chain32(struct ufs_inode_info *ufsi,
struct buffer_head *bh, __fs32 *v,
Indirect *from, Indirect *to)
{ … }
static inline int grow_chain64(struct ufs_inode_info *ufsi,
struct buffer_head *bh, __fs64 *v,
Indirect *from, Indirect *to)
{ … }
static u64 ufs_frag_map(struct inode *inode, unsigned offsets[4], int depth)
{ … }
static bool
ufs_extend_tail(struct inode *inode, u64 writes_to,
int *err, struct page *locked_page)
{ … }
static u64
ufs_inode_getfrag(struct inode *inode, unsigned index,
sector_t new_fragment, int *err,
int *new, struct page *locked_page)
{ … }
static u64
ufs_inode_getblock(struct inode *inode, u64 ind_block,
unsigned index, sector_t new_fragment, int *err,
int *new, struct page *locked_page)
{ … }
static int ufs_getfrag_block(struct inode *inode, sector_t fragment, struct buffer_head *bh_result, int create)
{ … }
static int ufs_writepages(struct address_space *mapping,
struct writeback_control *wbc)
{ … }
static int ufs_read_folio(struct file *file, struct folio *folio)
{ … }
int ufs_prepare_chunk(struct page *page, loff_t pos, unsigned len)
{ … }
static void ufs_truncate_blocks(struct inode *);
static void ufs_write_failed(struct address_space *mapping, loff_t to)
{ … }
static int ufs_write_begin(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len,
struct page **pagep, void **fsdata)
{ … }
static int ufs_write_end(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned copied,
struct page *page, void *fsdata)
{ … }
static sector_t ufs_bmap(struct address_space *mapping, sector_t block)
{ … }
const struct address_space_operations ufs_aops = …;
static void ufs_set_inode_ops(struct inode *inode)
{ … }
static int ufs1_read_inode(struct inode *inode, struct ufs_inode *ufs_inode)
{ … }
static int ufs2_read_inode(struct inode *inode, struct ufs2_inode *ufs2_inode)
{ … }
struct inode *ufs_iget(struct super_block *sb, unsigned long ino)
{ … }
static void ufs1_update_inode(struct inode *inode, struct ufs_inode *ufs_inode)
{ … }
static void ufs2_update_inode(struct inode *inode, struct ufs2_inode *ufs_inode)
{ … }
static int ufs_update_inode(struct inode * inode, int do_sync)
{ … }
int ufs_write_inode(struct inode *inode, struct writeback_control *wbc)
{ … }
int ufs_sync_inode (struct inode *inode)
{ … }
void ufs_evict_inode(struct inode * inode)
{ … }
struct to_free { … };
static inline void free_data(struct to_free *ctx, u64 from, unsigned count)
{ … }
#define DIRECT_FRAGMENT …
static void ufs_trunc_direct(struct inode *inode)
{ … }
static void free_full_branch(struct inode *inode, u64 ind_block, int depth)
{ … }
static void free_branch_tail(struct inode *inode, unsigned from, struct ufs_buffer_head *ubh, int depth)
{ … }
static int ufs_alloc_lastblock(struct inode *inode, loff_t size)
{ … }
static void ufs_truncate_blocks(struct inode *inode)
{ … }
static int ufs_truncate(struct inode *inode, loff_t size)
{ … }
int ufs_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
struct iattr *attr)
{ … }
const struct inode_operations ufs_file_inode_operations = …;