static int nilfs_segctor_confirm(struct nilfs_sc_info *sci)
{
- struct the_nilfs *nilfs = sci->sc_sbi->s_nilfs;
+ struct the_nilfs *nilfs = NILFS_SB(sci->sc_super)->s_nilfs;
int ret = 0;
if (nilfs_test_metadata_dirty(nilfs, sci->sc_root))
static void nilfs_segctor_clear_metadata_dirty(struct nilfs_sc_info *sci)
{
- struct nilfs_sb_info *sbi = sci->sc_sbi;
- struct the_nilfs *nilfs = sbi->s_nilfs;
+ struct the_nilfs *nilfs = NILFS_SB(sci->sc_super)->s_nilfs;
nilfs_mdt_clear_dirty(sci->sc_root->ifile);
nilfs_mdt_clear_dirty(nilfs->ns_cpfile);
static int nilfs_segctor_create_checkpoint(struct nilfs_sc_info *sci)
{
- struct the_nilfs *nilfs = sci->sc_sbi->s_nilfs;
+ struct the_nilfs *nilfs = NILFS_SB(sci->sc_super)->s_nilfs;
struct buffer_head *bh_cp;
struct nilfs_checkpoint *raw_cp;
int err;
static int nilfs_segctor_fill_in_checkpoint(struct nilfs_sc_info *sci)
{
- struct nilfs_sb_info *sbi = sci->sc_sbi;
- struct the_nilfs *nilfs = sbi->s_nilfs;
+ struct the_nilfs *nilfs = NILFS_SB(sci->sc_super)->s_nilfs;
struct buffer_head *bh_cp;
struct nilfs_checkpoint *raw_cp;
int err;
static int nilfs_segctor_collect_blocks(struct nilfs_sc_info *sci, int mode)
{
- struct nilfs_sb_info *sbi = sci->sc_sbi;
- struct the_nilfs *nilfs = sbi->s_nilfs;
+ struct the_nilfs *nilfs = NILFS_SB(sci->sc_super)->s_nilfs;
struct list_head *head;
struct nilfs_inode_info *ii;
size_t ndone;
{
struct nilfs_segment_buffer *segbuf;
struct page *bd_page = NULL, *fs_page = NULL;
- struct the_nilfs *nilfs = sci->sc_sbi->s_nilfs;
+ struct the_nilfs *nilfs = NILFS_SB(sci->sc_super)->s_nilfs;
int update_sr = false;
list_for_each_entry(segbuf, &sci->sc_write_logs, sb_list) {
*/
static int nilfs_segctor_do_construct(struct nilfs_sc_info *sci, int mode)
{
- struct nilfs_sb_info *sbi = sci->sc_sbi;
- struct the_nilfs *nilfs = sbi->s_nilfs;
+ struct the_nilfs *nilfs = NILFS_SB(sci->sc_super)->s_nilfs;
struct page *failed_page;
int err;
*/
static int nilfs_segctor_construct(struct nilfs_sc_info *sci, int mode)
{
- struct nilfs_sb_info *sbi = sci->sc_sbi;
+ struct nilfs_sb_info *sbi = NILFS_SB(sci->sc_super);
struct the_nilfs *nilfs = sbi->s_nilfs;
struct nilfs_super_block **sbp;
int err = 0;
static void nilfs_segctor_thread_construct(struct nilfs_sc_info *sci, int mode)
{
- struct nilfs_sb_info *sbi = sci->sc_sbi;
+ struct nilfs_sb_info *sbi = NILFS_SB(sci->sc_super);
struct nilfs_transaction_info ti;
nilfs_transaction_lock(sbi, &ti, 0);
static int nilfs_segctor_thread(void *arg)
{
struct nilfs_sc_info *sci = (struct nilfs_sc_info *)arg;
- struct the_nilfs *nilfs = sci->sc_sbi->s_nilfs;
+ struct the_nilfs *nilfs = NILFS_SB(sci->sc_super)->s_nilfs;
int timeout = 0;
sci->sc_timer.data = (unsigned long)current;
if (!sci)
return NULL;
- sci->sc_sbi = sbi;
sci->sc_super = sbi->s_super;
nilfs_get_root(root);
/* The segctord thread was stopped and its timer was removed.
But some tasks remain. */
do {
- struct nilfs_sb_info *sbi = sci->sc_sbi;
+ struct nilfs_sb_info *sbi = NILFS_SB(sci->sc_super);
struct nilfs_transaction_info ti;
nilfs_transaction_lock(sbi, &ti, 0);
*/
static void nilfs_segctor_destroy(struct nilfs_sc_info *sci)
{
- struct the_nilfs *nilfs = sci->sc_sbi->s_nilfs;
+ struct the_nilfs *nilfs = NILFS_SB(sci->sc_super)->s_nilfs;
int flag;
up_write(&nilfs->ns_segctor_sem);