• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/fs/gfs2/

Lines Matching refs:gi

59 static int dump_glock(struct glock_iter *gi, struct gfs2_glock *gl);
1018 static void print_dbg(struct glock_iter *gi, const char *fmt, ...)
1023 if (gi) {
1024 vsprintf(gi->string, fmt, args);
1025 seq_printf(gi->seq, gi->string);
1763 static void gfs2_print_symbol(struct glock_iter *gi, const char *fmt,
1769 print_dbg(gi, fmt, buffer);
1780 static int dump_holder(struct glock_iter *gi, char *str,
1786 print_dbg(gi, " %s\n", str);
1788 print_dbg(gi, " owner = %ld ", (long)gh->gh_owner_pid);
1791 print_dbg(gi, "(%s)\n", gh_owner->comm);
1793 print_dbg(gi, "(ended)\n");
1795 print_dbg(gi, " owner = -1\n");
1796 print_dbg(gi, " gh_state = %u\n", gh->gh_state);
1797 print_dbg(gi, " gh_flags =");
1800 print_dbg(gi, " %u", x);
1801 print_dbg(gi, " \n");
1802 print_dbg(gi, " error = %d\n", gh->gh_error);
1803 print_dbg(gi, " gh_iflags =");
1806 print_dbg(gi, " %u", x);
1807 print_dbg(gi, " \n");
1808 gfs2_print_symbol(gi, " initialized at: %s\n", gh->gh_ip);
1820 static int dump_inode(struct glock_iter *gi, struct gfs2_inode *ip)
1824 print_dbg(gi, " Inode:\n");
1825 print_dbg(gi, " num = %llu/%llu\n",
1827 print_dbg(gi, " type = %u\n", IF2DT(ip->i_inode.i_mode));
1828 print_dbg(gi, " i_flags =");
1831 print_dbg(gi, " %u", x);
1832 print_dbg(gi, " \n");
1844 static int dump_glock(struct glock_iter *gi, struct gfs2_glock *gl)
1853 print_dbg(gi, "Glock 0x%p (%u, %llu)\n", gl, gl->gl_name.ln_type,
1855 print_dbg(gi, " gl_flags =");
1858 print_dbg(gi, " %u", x);
1861 print_dbg(gi, " (unlocked)");
1862 print_dbg(gi, " \n");
1863 print_dbg(gi, " gl_ref = %d\n", atomic_read(&gl->gl_ref));
1864 print_dbg(gi, " gl_state = %u\n", gl->gl_state);
1868 print_dbg(gi, " gl_owner = pid %d (%s)\n",
1871 print_dbg(gi, " gl_owner = %d (ended)\n",
1874 print_dbg(gi, " gl_owner = -1\n");
1875 print_dbg(gi, " gl_ip = %lu\n", gl->gl_ip);
1876 print_dbg(gi, " req_gh = %s\n", (gl->gl_req_gh) ? "yes" : "no");
1877 print_dbg(gi, " req_bh = %s\n", (gl->gl_req_bh) ? "yes" : "no");
1878 print_dbg(gi, " lvb_count = %d\n", atomic_read(&gl->gl_lvb_count));
1879 print_dbg(gi, " object = %s\n", (gl->gl_object) ? "yes" : "no");
1880 print_dbg(gi, " le = %s\n",
1882 print_dbg(gi, " reclaim = %s\n",
1885 print_dbg(gi, " aspace = 0x%p nrpages = %lu\n", gl->gl_aspace,
1888 print_dbg(gi, " aspace = no\n");
1889 print_dbg(gi, " ail = %d\n", atomic_read(&gl->gl_ail_count));
1891 error = dump_holder(gi, "Request", gl->gl_req_gh);
1896 error = dump_holder(gi, "Holder", gh);
1901 error = dump_holder(gi, "Waiter1", gh);
1906 error = dump_holder(gi, "Waiter3", gh);
1911 print_dbg(gi, " Demotion req to state %u (%llu uS ago)\n",
1918 error = dump_inode(gi, gl->gl_object);
1923 print_dbg(gi, " Inode: busy\n");
1987 static int gfs2_glock_iter_next(struct glock_iter *gi)
1989 read_lock(gl_lock_addr(gi->hash));
1991 if (!gi->hb_list) { /* If we don't have a hash bucket yet */
1992 gi->hb_list = &gl_hash_table[gi->hash].hb_list;
1993 if (hlist_empty(gi->hb_list)) {
1994 read_unlock(gl_lock_addr(gi->hash));
1995 gi->hash++;
1996 read_lock(gl_lock_addr(gi->hash));
1997 gi->hb_list = NULL;
1998 if (gi->hash >= GFS2_GL_HASH_SIZE) {
1999 read_unlock(gl_lock_addr(gi->hash));
2005 if (!hlist_empty(gi->hb_list)) {
2006 gi->gl = list_entry(gi->hb_list->first,
2011 if (gi->gl->gl_list.next == NULL) {
2012 read_unlock(gl_lock_addr(gi->hash));
2013 gi->hash++;
2014 read_lock(gl_lock_addr(gi->hash));
2015 gi->hb_list = NULL;
2018 gi->gl = list_entry(gi->gl->gl_list.next,
2021 if (gi->gl)
2024 read_unlock(gl_lock_addr(gi->hash));
2028 static void gfs2_glock_iter_free(struct glock_iter *gi)
2030 kfree(gi);
2035 struct glock_iter *gi;
2037 gi = kmalloc(sizeof (*gi), GFP_KERNEL);
2038 if (!gi)
2041 gi->sdp = sdp;
2042 gi->hash = 0;
2043 gi->gl = NULL;
2044 gi->hb_list = NULL;
2045 gi->seq = NULL;
2046 memset(gi->string, 0, sizeof(gi->string));
2048 if (gfs2_glock_iter_next(gi)) {
2049 gfs2_glock_iter_free(gi);
2053 return gi;
2058 struct glock_iter *gi;
2061 gi = gfs2_glock_iter_init(file->private);
2062 if (!gi)
2066 if (gfs2_glock_iter_next(gi)) {
2067 gfs2_glock_iter_free(gi);
2072 return gi;
2078 struct glock_iter *gi = iter_ptr;
2082 if (gfs2_glock_iter_next(gi)) {
2083 gfs2_glock_iter_free(gi);
2087 return gi;
2097 struct glock_iter *gi = iter_ptr;
2099 gi->seq = file;
2100 dump_glock(gi, gi->gl);