/Linux-v6.6/fs/gfs2/ |
D | log.c | 35 static void gfs2_log_shutdown(struct gfs2_sbd *sdp); 39 * @sdp: the filesystem 48 unsigned int gfs2_struct2blk(struct gfs2_sbd *sdp, unsigned int nstruct) in gfs2_struct2blk() argument 55 first = sdp->sd_ldptrs; in gfs2_struct2blk() 59 second = sdp->sd_inptrs; in gfs2_struct2blk() 94 * @sdp: The superblock 100 static int gfs2_ail1_start_one(struct gfs2_sbd *sdp, in gfs2_ail1_start_one() argument 103 __releases(&sdp->sd_ail_lock) in gfs2_ail1_start_one() 104 __acquires(&sdp->sd_ail_lock) in gfs2_ail1_start_one() 115 gfs2_assert(sdp, bd->bd_tr == tr); in gfs2_ail1_start_one() [all …]
|
D | ops_fstype.c | 65 void free_sbd(struct gfs2_sbd *sdp) in free_sbd() argument 67 if (sdp->sd_lkstats) in free_sbd() 68 free_percpu(sdp->sd_lkstats); in free_sbd() 69 kfree(sdp); in free_sbd() 74 struct gfs2_sbd *sdp; in init_sbd() local 77 sdp = kzalloc(sizeof(struct gfs2_sbd), GFP_KERNEL); in init_sbd() 78 if (!sdp) in init_sbd() 81 sdp->sd_vfs = sb; in init_sbd() 82 sdp->sd_lkstats = alloc_percpu(struct gfs2_pcpu_lkstats); in init_sbd() 83 if (!sdp->sd_lkstats) in init_sbd() [all …]
|
D | util.c | 39 void gfs2_assert_i(struct gfs2_sbd *sdp) in gfs2_assert_i() argument 41 fs_emerg(sdp, "fatal assertion failed\n"); in gfs2_assert_i() 46 * @sdp: The GFS2 superblock 52 int check_journal_clean(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd, in check_journal_clean() argument 65 fs_err(sdp, "Error %d locking journal for spectator " in check_journal_clean() 72 fs_err(sdp, "Error checking journal for spectator " in check_journal_clean() 79 fs_err(sdp, "Error parsing journal for spectator " in check_journal_clean() 86 fs_err(sdp, "jid=%u: Journal is dirty, so the first " in check_journal_clean() 98 * @sdp: the superblock 100 int gfs2_freeze_lock_shared(struct gfs2_sbd *sdp) in gfs2_freeze_lock_shared() argument [all …]
|
D | sys.c | 39 struct gfs2_sbd *sdp = container_of(kobj, struct gfs2_sbd, sd_kobj); in gfs2_attr_show() local 41 return a->show ? a->show(sdp, buf) : 0; in gfs2_attr_show() 47 struct gfs2_sbd *sdp = container_of(kobj, struct gfs2_sbd, sd_kobj); in gfs2_attr_store() local 49 return a->store ? a->store(sdp, buf, len) : len; in gfs2_attr_store() 60 static ssize_t id_show(struct gfs2_sbd *sdp, char *buf) in id_show() argument 63 MAJOR(sdp->sd_vfs->s_dev), MINOR(sdp->sd_vfs->s_dev)); in id_show() 66 static ssize_t status_show(struct gfs2_sbd *sdp, char *buf) in status_show() argument 68 unsigned long f = sdp->sd_flags; in status_show() 107 (sdp->sd_jdesc ? sdp->sd_jdesc->jd_jid : 0), in status_show() 108 (sdp->sd_args.ar_spectator ? 1 : 0), in status_show() [all …]
|
D | super.c | 55 * @sdp: The GFS2 superblock 59 void gfs2_jindex_free(struct gfs2_sbd *sdp) in gfs2_jindex_free() argument 64 spin_lock(&sdp->sd_jindex_spin); in gfs2_jindex_free() 65 list_add(&list, &sdp->sd_jindex_list); in gfs2_jindex_free() 66 list_del_init(&sdp->sd_jindex_list); in gfs2_jindex_free() 67 sdp->sd_journals = 0; in gfs2_jindex_free() 68 spin_unlock(&sdp->sd_jindex_spin); in gfs2_jindex_free() 70 sdp->sd_jdesc = NULL; in gfs2_jindex_free() 92 struct gfs2_jdesc *gfs2_jdesc_find(struct gfs2_sbd *sdp, unsigned int jid) in gfs2_jdesc_find() argument 96 spin_lock(&sdp->sd_jindex_spin); in gfs2_jdesc_find() [all …]
|
D | trans.c | 28 static void gfs2_print_trans(struct gfs2_sbd *sdp, const struct gfs2_trans *tr) in gfs2_print_trans() argument 30 fs_warn(sdp, "Transaction created at: %pSR\n", (void *)tr->tr_ip); in gfs2_print_trans() 31 fs_warn(sdp, "blocks=%u revokes=%u reserved=%u touched=%u\n", in gfs2_print_trans() 34 fs_warn(sdp, "Buf %u/%u Databuf %u/%u Revoke %u\n", in gfs2_print_trans() 40 int __gfs2_trans_begin(struct gfs2_trans *tr, struct gfs2_sbd *sdp, in __gfs2_trans_begin() argument 47 gfs2_print_trans(sdp, current->journal_info); in __gfs2_trans_begin() 52 if (!test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)) in __gfs2_trans_begin() 65 tr->tr_reserved += blocks + 1 + DIV_ROUND_UP(blocks - 1, databuf_limit(sdp)); in __gfs2_trans_begin() 73 if (gfs2_assert_warn(sdp, tr->tr_reserved <= sdp->sd_jdesc->jd_blocks)) in __gfs2_trans_begin() 76 sb_start_intwrite(sdp->sd_vfs); in __gfs2_trans_begin() [all …]
|
D | util.h | 28 void gfs2_assert_i(struct gfs2_sbd *sdp); 30 #define gfs2_assert(sdp, assertion) \ argument 33 gfs2_assert_i(sdp); \ 39 void gfs2_assert_withdraw_i(struct gfs2_sbd *sdp, char *assertion, 43 #define gfs2_assert_withdraw(sdp, assertion) \ argument 47 gfs2_assert_withdraw_i((sdp), #assertion, \ 52 #define gfs2_assert_withdraw_delayed(sdp, assertion) \ argument 56 gfs2_assert_withdraw_i((sdp), #assertion, \ 61 void gfs2_assert_warn_i(struct gfs2_sbd *sdp, char *assertion, 64 #define gfs2_assert_warn(sdp, assertion) \ argument [all …]
|
D | log.h | 25 * @sdp: the filesystem 29 static inline void gfs2_log_lock(struct gfs2_sbd *sdp) in gfs2_log_lock() argument 30 __acquires(&sdp->sd_log_lock) in gfs2_log_lock() 32 spin_lock(&sdp->sd_log_lock); in gfs2_log_lock() 37 * @sdp: the filesystem 41 static inline void gfs2_log_unlock(struct gfs2_sbd *sdp) in gfs2_log_unlock() argument 42 __releases(&sdp->sd_log_lock) in gfs2_log_unlock() 44 spin_unlock(&sdp->sd_log_lock); in gfs2_log_unlock() 47 static inline void gfs2_log_pointers_init(struct gfs2_sbd *sdp, in gfs2_log_pointers_init() argument 50 if (++value == sdp->sd_jdesc->jd_blocks) { in gfs2_log_pointers_init() [all …]
|
D | quota.c | 88 static unsigned int gfs2_qd_hash(const struct gfs2_sbd *sdp, in gfs2_qd_hash() argument 93 h = jhash(&sdp, sizeof(struct gfs2_sbd *), 0); in gfs2_qd_hash() 112 struct gfs2_sbd *sdp = qd->qd_sbd; in gfs2_qd_dealloc() local 115 if (atomic_dec_and_test(&sdp->sd_quota_count)) in gfs2_qd_dealloc() 116 wake_up(&sdp->sd_kill_wait); in gfs2_qd_dealloc() 121 struct gfs2_sbd *sdp = qd->qd_sbd; in gfs2_qd_dispose() local 131 if (!gfs2_withdrawn(sdp)) { in gfs2_qd_dispose() 132 gfs2_assert_warn(sdp, !qd->qd_change); in gfs2_qd_dispose() 133 gfs2_assert_warn(sdp, !qd->qd_slot_ref); in gfs2_qd_dispose() 134 gfs2_assert_warn(sdp, !qd->qd_bh_count); in gfs2_qd_dispose() [all …]
|
D | lops.c | 37 * @sdp: The superblock 42 void gfs2_pin(struct gfs2_sbd *sdp, struct buffer_head *bh) in gfs2_pin() argument 50 gfs2_assert_withdraw(sdp, 0); in gfs2_pin() 52 gfs2_io_error_bh_wd(sdp, bh); in gfs2_pin() 57 spin_lock(&sdp->sd_ail_lock); in gfs2_pin() 60 spin_unlock(&sdp->sd_ail_lock); in gfs2_pin() 62 atomic_inc(&sdp->sd_log_pinned); in gfs2_pin() 74 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in maybe_release_space() local 82 if (sdp->sd_args.ar_discard) in maybe_release_space() 83 gfs2_rgrp_send_discards(sdp, rgd->rd_data0, bd->bd_bh, bi, 1, NULL); in maybe_release_space() [all …]
|
D | recovery.c | 118 int __get_log_header(struct gfs2_sbd *sdp, const struct gfs2_log_header *lh, in __get_log_header() argument 135 sdp->sd_sb.sb_bsize - LH_V1_SIZE - 4); in __get_log_header() 168 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in get_log_header() local 176 error = __get_log_header(sdp, (const struct gfs2_log_header *)bh->b_data, in get_log_header() 199 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in foreach_descriptor() local 213 if (gfs2_meta_check(sdp, bh)) { in foreach_descriptor() 234 } else if (gfs2_metatype_check(sdp, bh, GFS2_METATYPE_LD)) { in foreach_descriptor() 265 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in clean_journal() local 269 gfs2_write_log_header(sdp, jd, head->lh_sequence + 1, 0, lblock, in clean_journal() 272 if (jd->jd_jid == sdp->sd_lockstruct.ls_jid) { in clean_journal() [all …]
|
D | super.h | 18 extern void gfs2_lm_unmount(struct gfs2_sbd *sdp); 20 static inline unsigned int gfs2_jindex_size(struct gfs2_sbd *sdp) in gfs2_jindex_size() argument 23 spin_lock(&sdp->sd_jindex_spin); in gfs2_jindex_size() 24 x = sdp->sd_journals; in gfs2_jindex_size() 25 spin_unlock(&sdp->sd_jindex_spin); in gfs2_jindex_size() 29 extern void gfs2_jindex_free(struct gfs2_sbd *sdp); 31 extern struct gfs2_jdesc *gfs2_jdesc_find(struct gfs2_sbd *sdp, unsigned int jid); 33 extern int gfs2_lookup_in_master_dir(struct gfs2_sbd *sdp, char *filename, 36 extern int gfs2_make_fs_rw(struct gfs2_sbd *sdp); 37 extern void gfs2_make_fs_ro(struct gfs2_sbd *sdp); [all …]
|
D | lock_dlm.c | 192 static int make_mode(struct gfs2_sbd *sdp, const unsigned int lmstate) in make_mode() argument 204 fs_err(sdp, "unknown LM state %d\n", lmstate); in make_mode() 290 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in gdlm_put_lock() local 291 struct lm_lockstruct *ls = &sdp->sd_lockstruct; in gdlm_put_lock() 307 if (test_bit(SDF_SKIP_DLM_UNLOCK, &sdp->sd_flags) && in gdlm_put_lock() 320 fs_err(sdp, "gdlm_unlock %x,%llx err=%d\n", in gdlm_put_lock() 509 static int sync_unlock(struct gfs2_sbd *sdp, struct dlm_lksb *lksb, char *name) in sync_unlock() argument 511 struct lm_lockstruct *ls = &sdp->sd_lockstruct; in sync_unlock() 516 fs_err(sdp, "%s lkid %x error %d\n", in sync_unlock() 524 fs_err(sdp, "%s lkid %x status %d\n", in sync_unlock() [all …]
|
D | glops.c | 36 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in gfs2_ail_error() local 38 fs_err(sdp, in gfs2_ail_error() 43 fs_err(sdp, "AIL glock %u:%llu mapping %p\n", in gfs2_ail_error() 46 gfs2_lm(sdp, "AIL error\n"); in gfs2_ail_error() 47 gfs2_withdraw_delayed(sdp); in gfs2_ail_error() 62 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in __gfs2_ail_flush() local 68 gfs2_log_lock(sdp); in __gfs2_ail_flush() 69 spin_lock(&sdp->sd_ail_lock); in __gfs2_ail_flush() 79 gfs2_trans_add_revoke(sdp, bd); in __gfs2_ail_flush() 83 spin_unlock(&sdp->sd_ail_lock); in __gfs2_ail_flush() [all …]
|
D | meta_io.c | 117 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in gfs2_getbuf() local 125 mapping = &sdp->sd_aspace; in gfs2_getbuf() 127 shift = PAGE_SHIFT - sdp->sd_sb.sb_bsize_shift; in gfs2_getbuf() 139 create_empty_buffers(page, sdp->sd_sb.sb_bsize, 0); in gfs2_getbuf() 157 map_bh(bh, sdp->sd_vfs, blkno); in gfs2_getbuf() 256 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in gfs2_meta_read() local 260 if (unlikely(gfs2_withdrawn(sdp)) && !gfs2_withdraw_in_prog(sdp)) { in gfs2_meta_read() 299 gfs2_io_error_bh_wd(sdp, bh); in gfs2_meta_read() 310 * @sdp: the filesystem 316 int gfs2_meta_wait(struct gfs2_sbd *sdp, struct buffer_head *bh) in gfs2_meta_wait() argument [all …]
|
D | lops.h | 14 extern void gfs2_log_incr_head(struct gfs2_sbd *sdp); 16 extern void gfs2_log_write(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd, 20 extern void gfs2_pin(struct gfs2_sbd *sdp, struct buffer_head *bh); 23 extern void gfs2_drain_revokes(struct gfs2_sbd *sdp); 24 static inline unsigned int buf_limit(struct gfs2_sbd *sdp) in buf_limit() argument 26 return sdp->sd_ldptrs; in buf_limit() 29 static inline unsigned int databuf_limit(struct gfs2_sbd *sdp) in databuf_limit() argument 31 return sdp->sd_ldptrs / 2; in databuf_limit() 34 static inline void lops_before_commit(struct gfs2_sbd *sdp, in lops_before_commit() argument 40 gfs2_log_ops[x]->lo_before_commit(sdp, tr); in lops_before_commit() [all …]
|
D | rgrp.c | 109 struct gfs2_sbd *sdp = rbm->rgd->rd_sbd; in gfs2_setbit() local 111 fs_warn(sdp, "buf_blk = 0x%x old_state=%d, new_state=%d\n", in gfs2_setbit() 113 fs_warn(sdp, "rgrp=0x%llx bi_start=0x%x biblk: 0x%llx\n", in gfs2_setbit() 116 fs_warn(sdp, "bi_offset=0x%x bi_bytes=0x%x block=0x%llx\n", in gfs2_setbit() 467 struct gfs2_sbd *sdp = rgd->rd_sbd; in gfs2_rgrp_verify() local 486 gfs2_lm(sdp, "free data mismatch: %u != %u\n", in gfs2_rgrp_verify() 494 gfs2_lm(sdp, "used data mismatch: %u != %u\n", in gfs2_rgrp_verify() 501 gfs2_lm(sdp, "used metadata mismatch: %u != %u\n", in gfs2_rgrp_verify() 510 * @sdp: The GFS2 superblock 524 struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, u64 blk, bool exact) in gfs2_blk2rgrpd() argument [all …]
|
D | aops.c | 156 struct gfs2_sbd *sdp = GFS2_SB(inode); in gfs2_jdata_writepage() local 158 if (gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(ip->i_gl))) in gfs2_jdata_writepage() 181 struct gfs2_sbd *sdp = gfs2_mapping2sbd(mapping); in gfs2_writepages() local 193 set_bit(SDF_FORCE_AIL_FLUSH, &sdp->sd_flags); in gfs2_writepages() 213 struct gfs2_sbd *sdp = GFS2_SB(inode); in gfs2_write_jdata_batch() local 224 ret = gfs2_trans_begin(sdp, nrblocks, nrblocks); in gfs2_write_jdata_batch() 293 gfs2_trans_end(sdp); in gfs2_write_jdata_batch() 393 struct gfs2_sbd *sdp = GFS2_SB(mapping->host); in gfs2_jdata_writepages() local 398 gfs2_log_flush(sdp, ip->i_gl, GFS2_LOG_HEAD_FLUSH_NORMAL | in gfs2_jdata_writepages() 454 struct gfs2_sbd *sdp = GFS2_SB(inode); in gfs2_read_folio() local [all …]
|
D | glock.c | 55 struct gfs2_sbd *sdp; /* incore superblock */ member 157 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in glock_blocked_by_withdraw() local 159 if (likely(!gfs2_withdrawn(sdp))) in glock_blocked_by_withdraw() 163 if (!sdp->sd_jdesc || in glock_blocked_by_withdraw() 164 gl->gl_name.ln_number == sdp->sd_jdesc->jd_no_addr) in glock_blocked_by_withdraw() 171 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in gfs2_glock_free() local 178 if (atomic_dec_and_test(&sdp->sd_glock_disposal)) in gfs2_glock_free() 179 wake_up(&sdp->sd_kill_wait); in gfs2_glock_free() 272 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; in __gfs2_glock_put() local 281 if (!gfs2_withdrawn(sdp)) in __gfs2_glock_put() [all …]
|
D | bmap.c | 178 * @sdp: The superblock 235 static void find_metapath(const struct gfs2_sbd *sdp, u64 block, in find_metapath() argument 242 mp->mp_list[i] = do_div(block, sdp->sd_inptrs); in find_metapath() 389 static sector_t metapath_to_block(struct gfs2_sbd *sdp, struct metapath *mp) in metapath_to_block() argument 397 factor *= sdp->sd_inptrs; in metapath_to_block() 470 struct gfs2_sbd *sdp = GFS2_SB(inode); 483 factor *= sdp->sd_inptrs; 493 ptrs = (hgt >= 1 ? sdp->sd_inptrs : sdp->sd_diptrs) - start; 523 factor *= sdp->sd_inptrs; 528 if (mp->mp_list[hgt] >= sdp->sd_inptrs) [all …]
|
D | xattr.c | 36 static int ea_calc_size(struct gfs2_sbd *sdp, unsigned int nsize, size_t dsize, in ea_calc_size() argument 39 unsigned int jbsize = sdp->sd_jbsize; in ea_calc_size() 54 static int ea_check_size(struct gfs2_sbd *sdp, unsigned int nsize, size_t dsize) in ea_check_size() argument 61 ea_calc_size(sdp, nsize, dsize, &size); in ea_check_size() 64 if (size > sdp->sd_jbsize) in ea_check_size() 70 static bool gfs2_eatype_valid(struct gfs2_sbd *sdp, u8 type) in gfs2_eatype_valid() argument 72 switch(sdp->sd_sb.sb_fs_format) { in gfs2_eatype_valid() 91 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); in ea_foreach_i() local 104 if (!gfs2_eatype_valid(sdp, ea->ea_type)) in ea_foreach_i() 234 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); in ea_dealloc_unstuffed() local [all …]
|
/Linux-v6.6/drivers/scsi/ |
D | sg.c | 196 static Sg_fd *sg_add_sfp(Sg_device * sdp); 209 #define sg_printk(prefix, sdp, fmt, a...) \ argument 210 sdev_prefix_printk(prefix, (sdp)->device, (sdp)->name, fmt, ##a) 246 open_wait(Sg_device *sdp, int flags) in open_wait() argument 251 while (sdp->open_cnt > 0) { in open_wait() 252 mutex_unlock(&sdp->open_rel_lock); in open_wait() 253 retval = wait_event_interruptible(sdp->open_wait, in open_wait() 254 (atomic_read(&sdp->detaching) || in open_wait() 255 !sdp->open_cnt)); in open_wait() 256 mutex_lock(&sdp->open_rel_lock); in open_wait() [all …]
|
D | sd.c | 140 struct scsi_device *sdp = sdkp->device; in cache_type_store() local 148 if (sdp->type != TYPE_DISK && sdp->type != TYPE_ZBC) in cache_type_store() 175 if (scsi_mode_sense(sdp, 0x08, 8, 0, buffer, sizeof(buffer), SD_TIMEOUT, in cache_type_store() 193 if (scsi_mode_select(sdp, 1, sp, buffer_data, len, SD_TIMEOUT, in cache_type_store() 208 struct scsi_device *sdp = sdkp->device; in manage_start_stop_show() local 211 sdp->manage_system_start_stop && in manage_start_stop_show() 212 sdp->manage_runtime_start_stop && in manage_start_stop_show() 213 sdp->manage_shutdown); in manage_start_stop_show() 222 struct scsi_device *sdp = sdkp->device; in manage_system_start_stop_show() local 224 return sysfs_emit(buf, "%u\n", sdp->manage_system_start_stop); in manage_system_start_stop_show() [all …]
|
/Linux-v6.6/arch/sh/kernel/cpu/shmobile/ |
D | pm.c | 49 struct sh_sleep_data *sdp = onchip_mem; in sh_mobile_call_standby() local 53 standby_onchip_mem = (void *)(sdp + 1); in sh_mobile_call_standby() 83 struct sh_sleep_data *sdp; in sh_mobile_register_self_refresh() local 87 sdp = onchip_mem; in sh_mobile_register_self_refresh() 88 sdp->addr.stbcr = 0xa4150020; /* STBCR */ in sh_mobile_register_self_refresh() 89 sdp->addr.bar = 0xa4150040; /* BAR */ in sh_mobile_register_self_refresh() 90 sdp->addr.pteh = 0xff000000; /* PTEH */ in sh_mobile_register_self_refresh() 91 sdp->addr.ptel = 0xff000004; /* PTEL */ in sh_mobile_register_self_refresh() 92 sdp->addr.ttb = 0xff000008; /* TTB */ in sh_mobile_register_self_refresh() 93 sdp->addr.tea = 0xff00000c; /* TEA */ in sh_mobile_register_self_refresh() [all …]
|
/Linux-v6.6/kernel/rcu/ |
D | srcutree.c | 125 struct srcu_data *sdp; in init_srcu_struct_data() local 131 WARN_ON_ONCE(ARRAY_SIZE(sdp->srcu_lock_count) != in init_srcu_struct_data() 132 ARRAY_SIZE(sdp->srcu_unlock_count)); in init_srcu_struct_data() 134 sdp = per_cpu_ptr(ssp->sda, cpu); in init_srcu_struct_data() 135 spin_lock_init(&ACCESS_PRIVATE(sdp, lock)); in init_srcu_struct_data() 136 rcu_segcblist_init(&sdp->srcu_cblist); in init_srcu_struct_data() 137 sdp->srcu_cblist_invoking = false; in init_srcu_struct_data() 138 sdp->srcu_gp_seq_needed = ssp->srcu_sup->srcu_gp_seq; in init_srcu_struct_data() 139 sdp->srcu_gp_seq_needed_exp = ssp->srcu_sup->srcu_gp_seq; in init_srcu_struct_data() 140 sdp->mynode = NULL; in init_srcu_struct_data() [all …]
|