kernels/linux-2.4.0/fs/nfs/write.c
/*
 * Scan cluster for dirty pages and send as many of them to the
 * server as possible.
 */
Scan cluster for dirty pages and send as many of them to the
server as possible.
Scan cluster for dirty pages and send as many of them to the server as possible .
int nfs_scan_list_timeout(struct list_head *head, struct list_head *dst, struct inode *inode)
{
	struct list_head	*p;
        struct nfs_page		*req;
        int			pages = 0;
	p = head->next;
        while (p != head) {
		req = nfs_list_entry(p);
		p = p->next;
		if (time_after(req->wb_timeout, jiffies)) {
			if (time_after(NFS_NEXTSCAN(inode), req->wb_timeout))
				NFS_NEXTSCAN(inode) = req->wb_timeout;
			continue;
		}
		if (!nfs_lock_request(req))
			continue;
		nfs_list_remove_request(req);
		nfs_list_add_request(req, dst);
		pages++;
	}
	return pages;
}
int nfs_scan_list_timeout ( struct list_head * head , struct list_head * dst , struct inode * inode ) { struct list_head * p ; struct nfs_page * req ; int pages = 0 ; p = head -> next ; while ( p != head ) { req = nfs_list_entry ( p ) ; p = p -> next ; if ( time_after ( req -> wb_timeout , jiffies ) ) { if ( time_after ( NFS_NEXTSCAN ( inode ) , req -> wb_timeout ) ) NFS_NEXTSCAN ( inode ) = req -> wb_timeout ; continue ; } if ( ! nfs_lock_request ( req ) ) continue ; nfs_list_remove_request ( req ) ; nfs_list_add_request ( req , dst ) ; pages ++ ; } return pages ; }
Scan cluster for dirty pages and send as many of them to the
 server as possible.
Scan cluster for dirty pages and send as many of them to the server as possible .