afs/fs/cachefs aops.c,1.26,1.27
dwh at infradead.org
dwh at infradead.org
Fri Apr 25 18:04:13 BST 2003
- Previous message: afs/include/linux cachefs.h,1.10,1.11
- Next message: afs/fs/cachefs super.c,1.26,1.27 interface.c,1.4,1.5
index.c,1.15,1.16 cachefs-int.h,1.29,1.30 block.c,1.3,1.4aops.c,1.27,1.28
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/afs/fs/cachefs
In directory phoenix.infradead.org:/tmp/cvs-serv3530/fs/cachefs
Modified Files:
aops.c
Log Message:
made CACHEFS_PAGE_* constants into bit numbers rather than masks
Index: aops.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/aops.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- aops.c 24 Apr 2003 12:02:34 -0000 1.26
+++ aops.c 25 Apr 2003 16:04:10 -0000 1.27
@@ -329,7 +329,7 @@
goto alloc_new;
}
- if (cookie->flags & CACHEFS_PAGE_BOUNDARY)
+ if (test_bit(CACHEFS_PAGE_BOUNDARY,&cookie->flags))
cachefs_io_bio_submit(READ,_bio);
else
*last_block_in_bio = cookie->mapped_block->bix;
@@ -447,7 +447,7 @@
goto out;
}
- if (cookie->flags & CACHEFS_PAGE_NEW)
+ if (test_bit(CACHEFS_PAGE_NEW,&cookie->flags))
BUG();//unmap_underlying_metadata(inode->i_sb->s_bdev,cookie->mapped_block)
/* clear the tail end of the last block */
@@ -487,7 +487,7 @@
BUG_ON(PageWriteback(page));
SetPageWriteback(page);
unlock_page(page);
- if (cookie->flags & CACHEFS_PAGE_BOUNDARY) {
+ if (test_bit(CACHEFS_PAGE_BOUNDARY,&cookie->flags)) {
cachefs_io_bio_submit(WRITE,_bio);
// write_boundary_block(inode->i_sb->s_bdev,
// cookie->mapped_block->bix, 1 << PAGE_CACHE_SHIFT);
@@ -670,9 +670,9 @@
if (!cookie->mapped_block) BUG();
- if (cookie->flags & CACHEFS_PAGE_NEW) {
+ if (test_bit(CACHEFS_PAGE_NEW,&cookie->flags)) {
//unmap_underlying_metadata(bh->b_bdev,bh->b_blocknr);
- cookie->flags &= ~CACHEFS_PAGE_NEW;
+ clear_bit(CACHEFS_PAGE_NEW,&cookie->flags);
}
}
@@ -722,7 +722,7 @@
}
if (!PageUptodate(page)) {
- if (cookie->flags & CACHEFS_PAGE_NEW) {
+ if (test_bit(CACHEFS_PAGE_NEW,&cookie->flags)) {
//unmap_underlying_metadata(bh->b_bdev,bh->b_blocknr);
if (from>0 || to<PAGE_SIZE) {
void *kaddr;
@@ -757,19 +757,19 @@
wait_for_completion(&cpl);
}
- cookie->flags &= ~CACHEFS_PAGE_NEW;
+ clear_bit(CACHEFS_PAGE_NEW,&cookie->flags);
_leave(" = 0");
return 0;
error:
- if (cookie->flags & CACHEFS_PAGE_NEW) {
+ if (test_bit(CACHEFS_PAGE_NEW,&cookie->flags)) {
memset(kmap(page),0,PAGE_SIZE);
flush_dcache_page(page);
kunmap(page);
SetPageUptodate(page);
set_page_dirty(page);
- cookie->flags &= ~CACHEFS_PAGE_NEW;
+ clear_bit(CACHEFS_PAGE_NEW,&cookie->flags);
}
_leave(" = %d",ret);
@@ -1304,17 +1304,16 @@
/* got the block - set the block offset in the page mapping record */
if (path[0].flags & CACHEFS_BLOCK_NEW)
- cookie->flags |= CACHEFS_PAGE_NEW;
+ set_bit(CACHEFS_PAGE_NEW,&cookie->flags);
_debug("notboundary = %u",notboundary);
if (!notboundary)
- cookie->flags |= CACHEFS_PAGE_BOUNDARY;
+ set_bit(CACHEFS_PAGE_BOUNDARY,&cookie->flags);
- _leave(" = 0 [bix=%u %c%c%c]",
+ _leave(" = 0 [bix=%u %c%c]",
cookie->mapped_block->bix,
- cookie->flags & CACHEFS_PAGE_BOUNDARY ?'b':'-',
- cookie->flags & CACHEFS_PAGE_NEW ?'n':'-',
- cookie->flags & CACHEFS_PAGE_BYSECTORS ?'s':'-'
+ test_bit(CACHEFS_PAGE_BOUNDARY,&cookie->flags) ? 'b' : '-',
+ test_bit(CACHEFS_PAGE_NEW,&cookie->flags) ? 'n' : '-'
);
return 0;
} /* end cachefs_get_block() */
- Previous message: afs/include/linux cachefs.h,1.10,1.11
- Next message: afs/fs/cachefs super.c,1.26,1.27 interface.c,1.4,1.5
index.c,1.15,1.16 cachefs-int.h,1.29,1.30 block.c,1.3,1.4aops.c,1.27,1.28
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the linux-afs-cvs
mailing list