Commit a6a4f4e0 authored by Eric Sandeen's avatar Eric Sandeen Committed by Christoph Hellwig

XFS: Remove unused pagebuf flags

Modid: 2.5.x-xfs:slinx:129235a
parent 2ceb1958
......@@ -305,8 +305,7 @@ _pagebuf_initialize(
/*
* We don't want certain flags to appear in pb->pb_flags.
*/
flags &= ~(PBF_LOCK|PBF_ENTER_PAGES|PBF_MAPPED);
flags &= ~(PBF_DONT_BLOCK|PBF_READ_AHEAD);
flags &= ~(PBF_LOCK|PBF_MAPPED|PBF_DONT_BLOCK|PBF_READ_AHEAD);
pb_tracking_get(pb);
......@@ -717,7 +716,6 @@ _pagebuf_find( /* find buffer for block */
PBF_MAPPED | \
_PBF_LOCKABLE | \
_PBF_ALL_PAGES_MAPPED | \
_PBF_SOME_INVALID_PAGES | \
_PBF_ADDR_ALLOCATED | \
_PBF_MEM_ALLOCATED;
PB_TRACE(pb, PB_TRACE_REC(got_lk), 0);
......@@ -832,19 +830,11 @@ pagebuf_lookup(
int flags)
{
page_buf_t *pb = NULL;
int status;
flags |= _PBF_PRIVATE_BH;
pb = pagebuf_allocate(flags);
if (pb) {
_pagebuf_initialize(pb, target, ioff, isize, flags);
if (flags & PBF_ENTER_PAGES) {
status = _pagebuf_lookup_pages(pb, &inode->i_data, 0);
if (status != 0) {
pagebuf_free(pb);
return (NULL);
}
}
}
return pb;
}
......
......@@ -100,35 +100,27 @@ typedef enum page_buf_flags_e { /* pb_flags values */
PBF_MAPPABLE = (1 << 9),/* use directly-addressable pages */
PBF_STALE = (1 << 10), /* buffer has been staled, do not find it */
PBF_FS_MANAGED = (1 << 11), /* filesystem controls freeing memory */
PBF_RELEASE = (1 << 12),/* buffer to be released after I/O is done */
/* flags used only as arguments to access routines */
PBF_LOCK = (1 << 13), /* lock requested */
PBF_TRYLOCK = (1 << 14), /* lock requested, but do not wait */
PBF_ALLOCATE = (1 << 15), /* allocate all pages (UNUSED) */
PBF_FILE_ALLOCATE = (1 << 16), /* allocate all file space */
PBF_DONT_BLOCK = (1 << 17), /* do not block in current thread */
PBF_DIRECT = (1 << 18), /* direct I/O desired */
PBF_ENTER_PAGES = (1 << 21), /* create invalid pages for all */
/* pages in the range of the buffer */
/* not already associated with buffer */
PBF_FILE_ALLOCATE = (1 << 15), /* allocate all file space */
PBF_DONT_BLOCK = (1 << 16), /* do not block in current thread */
PBF_DIRECT = (1 << 17), /* direct I/O desired */
/* flags used only internally */
_PBF_LOCKABLE = (1 << 19), /* page_buf_t may be locked */
_PBF_PRIVATE_BH = (1 << 20), /* do not use public buffer heads */
_PBF_ALL_PAGES_MAPPED = (1 << 22),
_PBF_ALL_PAGES_MAPPED = (1 << 21),
/* all pages in rage are mapped */
_PBF_SOME_INVALID_PAGES = (1 << 23),
/* some mapped pages are not valid */
_PBF_ADDR_ALLOCATED = (1 << 24),
_PBF_ADDR_ALLOCATED = (1 << 22),
/* pb_addr space was allocated */
_PBF_MEM_ALLOCATED = (1 << 25),
_PBF_MEM_ALLOCATED = (1 << 23),
/* pb_mem and underlying pages allocated */
PBF_FORCEIO = (1 << 27),
PBF_FLUSH = (1 << 28), /* flush disk write cache */
PBF_READ_AHEAD = (1 << 29),
PBF_FS_RESERVED_3 = (1 << 31) /* reserved (XFS use: XFS_B_STALE) */
PBF_FORCEIO = (1 << 24),
PBF_FLUSH = (1 << 25), /* flush disk write cache */
PBF_READ_AHEAD = (1 << 26),
} page_buf_flags_t;
......
......@@ -1700,14 +1700,14 @@ static int kdbm_vn(
/* pagebuf stuff */
static char *pb_flag_vals[] = {
/* 0 */ "READ", "WRITE", "MAPPED", "PARTIAL",
/* 4 */ "ASYNC", "NONE", "DELWRI", "FREED", "SYNC",
/* 9 */ "MAPPABLE", "STALE", "FS_MANAGED", "RELEASE",
/* 13 */ "LOCK", "TRYLOCK", "ALLOCATE", "FILE_ALLOCATE", "DONT_BLOCK",
/* 18 */ "DIRECT", "LOCKABLE", "PRIVATE_BH", "ENTER_PAGES",
/* 22 */ "ALL_PAGES_MAPPED", "SOME_INVALID_PAGES", "ADDR_ALLOCATED",
/* 25 */ "MEM_ALLOCATED", "INVALID26", "FORCEIO", "FLUSH",
/* 29 */ "READ_AHEAD", "INVALID30", "FS_RESERVED",
/* 0 */ "READ", "WRITE", "MAPPED", "PARTIAL", "ASYNC",
/* 5 */ "NONE", "DELWRI", "FREED", "SYNC", "MAPPABLE",
/* 10 */ "STALE", "FS_MANAGED", "INVALID12", "LOCK", "TRYLOCK",
/* 15 */ "FILE_ALLOCATE", "DONT_BLOCK", "DIRECT", "INVALID18", "INVALID19",
/* 20 */ "LOCKABLE", "PRIVATE_BH", "ALL_PAGES_MAPPED", "ADDR_ALLOCATED",
"MEM_ALLOCATED",
/* 25 */ "FORCEIO", "FLUSH", "READ_AHEAD", "INVALID28", "INVALID29",
/* 30 */ "INVALID30", "INVALID31",
NULL };
static char *pbm_flag_vals[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment