Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 12185
b: refs/heads/master
c: c86e711
h: refs/heads/master
i:
  12183: 20b476f
v: v3
  • Loading branch information
Christoph Hellwig authored and Nathan Scott committed Nov 1, 2005
1 parent a82b817 commit 7fb1afc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d0cfb37305baef74903872cbb799174d0d353fd9
refs/heads/master: c86e711ceb4ad03c98a7aa29bcab8613e9f57788
8 changes: 4 additions & 4 deletions trunk/fs/xfs/linux-2.6/xfs_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ _pagebuf_initialize(
* most cases but may be reset (e.g. XFS recovery).
*/
pb->pb_buffer_length = pb->pb_count_desired = range_length;
pb->pb_flags = flags | PBF_NONE;
pb->pb_flags = flags;
pb->pb_bn = XFS_BUF_DADDR_NULL;
atomic_set(&pb->pb_pin_count, 0);
init_waitqueue_head(&pb->pb_waiters);
Expand Down Expand Up @@ -458,8 +458,8 @@ _pagebuf_lookup_pages(
unlock_page(bp->pb_pages[i]);
}

if (page_count)
bp->pb_flags &= ~PBF_NONE;
if (page_count == bp->pb_page_count)
bp->pb_flags |= PBF_DONE;

PB_TRACE(bp, "lookup_pages", (long)page_count);
return error;
Expand Down Expand Up @@ -1119,7 +1119,7 @@ pagebuf_iodone(
{
pb->pb_flags &= ~(PBF_READ | PBF_WRITE);
if (pb->pb_error == 0)
pb->pb_flags &= ~PBF_NONE;
pb->pb_flags |= PBF_DONE;

PB_TRACE(pb, "iodone", pb->pb_iodone);

Expand Down
8 changes: 4 additions & 4 deletions trunk/fs/xfs/linux-2.6/xfs_buf.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ typedef enum page_buf_flags_e { /* pb_flags values */
PBF_WRITE = (1 << 1), /* buffer intended for writing to device */
PBF_MAPPED = (1 << 2), /* buffer mapped (pb_addr valid) */
PBF_ASYNC = (1 << 4), /* initiator will not wait for completion */
PBF_NONE = (1 << 5), /* buffer not read at all */
PBF_DONE = (1 << 5), /* all pages in the buffer uptodate */
PBF_DELWRI = (1 << 6), /* buffer has dirty pages */
PBF_STALE = (1 << 7), /* buffer has been staled, do not find it */
PBF_FS_MANAGED = (1 << 8), /* filesystem controls freeing memory */
Expand Down Expand Up @@ -371,9 +371,9 @@ extern void pagebuf_trace(
#define XFS_BUF_GETERROR(x) pagebuf_geterror(x)
#define XFS_BUF_ISERROR(x) (pagebuf_geterror(x)?1:0)

#define XFS_BUF_DONE(x) ((x)->pb_flags &= ~PBF_NONE)
#define XFS_BUF_UNDONE(x) ((x)->pb_flags |= PBF_NONE)
#define XFS_BUF_ISDONE(x) (((x)->pb_flags & PBF_NONE) == 0)
#define XFS_BUF_DONE(x) ((x)->pb_flags |= PBF_DONE)
#define XFS_BUF_UNDONE(x) ((x)->pb_flags &= ~PBF_DONE)
#define XFS_BUF_ISDONE(x) ((x)->pb_flags & PBF_DONE)

#define XFS_BUF_BUSY(x) do { } while (0)
#define XFS_BUF_UNBUSY(x) do { } while (0)
Expand Down

0 comments on commit 7fb1afc

Please sign in to comment.