aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/sufile.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nilfs2/sufile.c')
-rw-r--r--fs/nilfs2/sufile.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/nilfs2/sufile.c b/fs/nilfs2/sufile.c
index 37994d4a59cc..6fb707ab7e2c 100644
--- a/fs/nilfs2/sufile.c
+++ b/fs/nilfs2/sufile.c
@@ -657,3 +657,19 @@ ssize_t nilfs_sufile_get_suinfo(struct inode *sufile, __u64 segnum, void *buf,
657 up_read(&NILFS_MDT(sufile)->mi_sem); 657 up_read(&NILFS_MDT(sufile)->mi_sem);
658 return ret; 658 return ret;
659} 659}
660
661/**
662 * nilfs_sufile_new - create sufile
663 * @nilfs: nilfs object
664 * @susize: size of a segment usage entry
665 */
666struct inode *nilfs_sufile_new(struct the_nilfs *nilfs, size_t susize)
667{
668 struct inode *sufile;
669
670 sufile = nilfs_mdt_new(nilfs, NULL, NILFS_SUFILE_INO, 0);
671 if (sufile)
672 nilfs_mdt_set_entry_size(sufile, susize,
673 sizeof(struct nilfs_sufile_header));
674 return sufile;
675}