• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/nilfs2/

Lines Matching defs:nilfs

46  * struct the_nilfs - struct to supervise multiple nilfs mount points
55 * @ns_mount_mutex: mutex protecting mount process of nilfs
63 * @ns_supers: list of nilfs super block structs
189 static inline void set_nilfs_##name(struct the_nilfs *nilfs) \
191 set_bit(THE_NILFS_##bit, &(nilfs)->ns_flags); \
193 static inline void clear_nilfs_##name(struct the_nilfs *nilfs) \
195 clear_bit(THE_NILFS_##bit, &(nilfs)->ns_flags); \
197 static inline int nilfs_##name(struct the_nilfs *nilfs) \
199 return test_bit(THE_NILFS_##bit, &(nilfs)->ns_flags); \
211 static inline int nilfs_sb_need_update(struct the_nilfs *nilfs)
214 return t < nilfs->ns_sbwtime || t > nilfs->ns_sbwtime + NILFS_SB_FREQ;
217 static inline int nilfs_sb_will_flip(struct the_nilfs *nilfs)
219 int flip_bits = nilfs->ns_sbwcount & 0x0FL;
237 static inline void get_nilfs(struct the_nilfs *nilfs)
240 atomic_inc(&nilfs->ns_count);
244 nilfs_attach_writer(struct the_nilfs *nilfs, struct nilfs_sb_info *sbi)
246 down_write(&nilfs->ns_writer_sem);
247 nilfs->ns_writer = sbi;
248 up_write(&nilfs->ns_writer_sem);
252 nilfs_detach_writer(struct the_nilfs *nilfs, struct nilfs_sb_info *sbi)
254 down_write(&nilfs->ns_writer_sem);
255 if (sbi == nilfs->ns_writer)
256 nilfs->ns_writer = NULL;
257 up_write(&nilfs->ns_writer_sem);
266 static inline int nilfs_valid_fs(struct the_nilfs *nilfs)
270 down_read(&nilfs->ns_sem);
271 valid_fs = (nilfs->ns_mount_state & NILFS_VALID_FS);
272 up_read(&nilfs->ns_sem);
277 nilfs_get_segment_range(struct the_nilfs *nilfs, __u64 segnum,
280 *seg_start = (sector_t)nilfs->ns_blocks_per_segment * segnum;
281 *seg_end = *seg_start + nilfs->ns_blocks_per_segment - 1;
283 *seg_start = nilfs->ns_first_data_block;
287 nilfs_get_segment_start_blocknr(struct the_nilfs *nilfs, __u64 segnum)
289 return (segnum == 0) ? nilfs->ns_first_data_block :
290 (sector_t)nilfs->ns_blocks_per_segment * segnum;
294 nilfs_get_segnum_of_block(struct the_nilfs *nilfs, sector_t blocknr)
298 sector_div(segnum, nilfs->ns_blocks_per_segment);
303 nilfs_terminate_segment(struct the_nilfs *nilfs, sector_t seg_start,
307 nilfs->ns_pseg_offset = seg_end - seg_start + 1;
310 static inline void nilfs_shift_to_next_segment(struct the_nilfs *nilfs)
313 nilfs->ns_segnum = nilfs->ns_nextnum;
314 nilfs->ns_pseg_offset = 0;
315 nilfs->ns_seg_seq++;
318 static inline __u64 nilfs_last_cno(struct the_nilfs *nilfs)
322 spin_lock(&nilfs->ns_last_segment_lock);
323 cno = nilfs->ns_last_cno;
324 spin_unlock(&nilfs->ns_last_segment_lock);
328 static inline int nilfs_segment_is_active(struct the_nilfs *nilfs, __u64 n)
330 return n == nilfs->ns_segnum || n == nilfs->ns_nextnum;