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.c31
1 files changed, 9 insertions, 22 deletions
diff --git a/fs/nilfs2/sufile.c b/fs/nilfs2/sufile.c
index e9b4cec0d3ef..5f18acab9dd4 100644
--- a/fs/nilfs2/sufile.c
+++ b/fs/nilfs2/sufile.c
@@ -112,6 +112,15 @@ static void nilfs_sufile_mod_counter(struct buffer_head *header_bh,
112} 112}
113 113
114/** 114/**
115 * nilfs_sufile_get_ncleansegs - return the number of clean segments
116 * @sufile: inode of segment usage file
117 */
118unsigned long nilfs_sufile_get_ncleansegs(struct inode *sufile)
119{
120 return NILFS_SUI(sufile)->ncleansegs;
121}
122
123/**
115 * nilfs_sufile_updatev - modify multiple segment usages at a time 124 * nilfs_sufile_updatev - modify multiple segment usages at a time
116 * @sufile: inode of segment usage file 125 * @sufile: inode of segment usage file
117 * @segnumv: array of segment numbers 126 * @segnumv: array of segment numbers
@@ -540,28 +549,6 @@ int nilfs_sufile_get_stat(struct inode *sufile, struct nilfs_sustat *sustat)
540 return ret; 549 return ret;
541} 550}
542 551
543/**
544 * nilfs_sufile_get_ncleansegs - get the number of clean segments
545 * @sufile: inode of segment usage file
546 * @nsegsp: pointer to the number of clean segments
547 *
548 * Description: nilfs_sufile_get_ncleansegs() acquires the number of clean
549 * segments.
550 *
551 * Return Value: On success, 0 is returned and the number of clean segments is
552 * stored in the place pointed by @nsegsp. On error, one of the following
553 * negative error codes is returned.
554 *
555 * %-EIO - I/O error.
556 *
557 * %-ENOMEM - Insufficient amount of memory available.
558 */
559int nilfs_sufile_get_ncleansegs(struct inode *sufile, unsigned long *nsegsp)
560{
561 *nsegsp = NILFS_SUI(sufile)->ncleansegs;
562 return 0;
563}
564
565void nilfs_sufile_do_set_error(struct inode *sufile, __u64 segnum, 552void nilfs_sufile_do_set_error(struct inode *sufile, __u64 segnum,
566 struct buffer_head *header_bh, 553 struct buffer_head *header_bh,
567 struct buffer_head *su_bh) 554 struct buffer_head *su_bh)