Whamcloud - gitweb
Debugging for page lists
authoradilger <adilger>
Fri, 21 Jan 2000 01:15:39 +0000 (01:15 +0000)
committeradilger <adilger>
Fri, 21 Jan 2000 01:15:39 +0000 (01:15 +0000)
lustre/include/linux/obdfs.h
lustre/obdfs/rw.c

index 7fb17f1..cbdf71b 100644 (file)
@@ -59,6 +59,16 @@ struct obdfs_pgrq {
        struct page             *rq_page;       /* page to be written */
 };
 
+void obdfs_print_list(struct list_head *page_list) {
+       struct list_head *tmp;
+
+       while ( (tmp = tmp->next) != page_list) {
+               struct obdfs_pgrq *pgrq;
+               pgrq = list_entry(tmp, struct obdfs_pgrq, rq_plist);
+               CDEBUG(D_INODE, "page %p\n", pgrq->rq_page);
+       }
+}
+
 inline void obdfs_pgrq_del(struct obdfs_pgrq *pgrq);
 int obdfs_do_vec_wr(struct super_block *sb, obd_count num_io, obd_count num_oa,
                           struct obdo **obdos, obd_count *oa_bufs,
index ee4ee93..1bdbf9e 100644 (file)
@@ -144,7 +144,6 @@ obdfs_find_in_page_list(struct inode *inode, struct page *page)
 {
        struct list_head *page_list = obdfs_iplist(inode);
        struct list_head *tmp;
-       struct obdfs_pgrq *pgrq;
 
        ENTRY;
        CDEBUG(D_INODE, "looking for inode %ld page %p\n", inode->i_ino, page);
@@ -155,6 +154,8 @@ obdfs_find_in_page_list(struct inode *inode, struct page *page)
        }
        tmp = page_list;
        while ( (tmp = tmp->next) != page_list ) {
+               struct obdfs_pgrq *pgrq;
+
                pgrq = list_entry(tmp, struct obdfs_pgrq, rq_plist);
                CDEBUG(D_INODE, "checking page %p\n", pgrq->rq_page);
                if (pgrq->rq_page == page) {
@@ -229,6 +230,7 @@ static int obdfs_add_page_to_cache(struct inode *inode, struct page *page)
                list_add(obdfs_islist(inode), obdfs_slist(inode));
        }
 
+
        EXIT;
        /* XXX For testing purposes, we write out the page here.
         *     In the future, a flush daemon will write out the page.