--------------------- PatchSet 310 Date: 2002/12/10 22:38:14 Author: rbcollins Branch: unify-io Tag: (none) Log: make canRead virtual Members: src/ufscommon.h:1.1.20.14->1.1.20.15 src/fs/aufs/store_asyncufs.h:1.2.12.17->1.2.12.18 src/fs/diskd/store_diskd.h:1.1.20.22->1.1.20.23 src/fs/diskd/store_io_diskd.cc:1.1.20.28->1.1.20.29 src/fs/ufs/store_io_ufs.cc:1.3.10.22->1.3.10.23 src/fs/ufs/store_ufs.h:1.1.20.15->1.1.20.16 Index: squid3/src/ufscommon.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ufscommon.h,v retrieving revision 1.1.20.14 retrieving revision 1.1.20.15 diff -u -r1.1.20.14 -r1.1.20.15 --- squid3/src/ufscommon.h 10 Dec 2002 11:45:07 -0000 1.1.20.14 +++ squid3/src/ufscommon.h 10 Dec 2002 22:38:14 -0000 1.1.20.15 @@ -1,6 +1,6 @@ /* - * $Id: ufscommon.h,v 1.1.20.14 2002/12/10 11:45:07 rbcollins Exp $ + * $Id: ufscommon.h,v 1.1.20.15 2002/12/10 22:38:14 rbcollins Exp $ * * SQUID Web Proxy Cache http://www.squid-cache.org/ * ---------------------------------------------------------- @@ -98,6 +98,7 @@ virtual void open (int, mode_t, IORequestor::Pointer) = 0; virtual void create (int, mode_t, IORequestor::Pointer) = 0; virtual void read(char *, off_t, size_t) {} + virtual bool canRead() const = 0; /* During miogration only */ virtual int getFD() const {return -1;} virtual bool error() const = 0; Index: squid3/src/fs/aufs/store_asyncufs.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/fs/aufs/Attic/store_asyncufs.h,v retrieving revision 1.2.12.17 retrieving revision 1.2.12.18 diff -u -r1.2.12.17 -r1.2.12.18 --- squid3/src/fs/aufs/store_asyncufs.h 10 Dec 2002 11:45:07 -0000 1.2.12.17 +++ squid3/src/fs/aufs/store_asyncufs.h 10 Dec 2002 22:38:14 -0000 1.2.12.18 @@ -96,7 +96,7 @@ void close(); virtual bool error() const; virtual int getFD() const { return fd;} - bool canRead() const; + virtual bool canRead() const; private: #if ASYNC_READ static AIOCB ReadDone; Index: squid3/src/fs/diskd/store_diskd.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/fs/diskd/Attic/store_diskd.h,v retrieving revision 1.1.20.22 retrieving revision 1.1.20.23 diff -u -r1.1.20.22 -r1.1.20.23 --- squid3/src/fs/diskd/store_diskd.h 9 Dec 2002 12:11:13 -0000 1.1.20.22 +++ squid3/src/fs/diskd/store_diskd.h 10 Dec 2002 22:38:14 -0000 1.1.20.23 @@ -29,6 +29,7 @@ virtual void create (int, mode_t, IORequestor::Pointer); virtual void close (); virtual bool error() const; + virtual bool canRead() const; /* Temporary */ int getID() const {return id;} Index: squid3/src/fs/diskd/store_io_diskd.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/fs/diskd/Attic/store_io_diskd.cc,v retrieving revision 1.1.20.28 retrieving revision 1.1.20.29 diff -u -r1.1.20.28 -r1.1.20.29 --- squid3/src/fs/diskd/store_io_diskd.cc 9 Dec 2002 12:11:13 -0000 1.1.20.28 +++ squid3/src/fs/diskd/store_io_diskd.cc 10 Dec 2002 22:38:14 -0000 1.1.20.29 @@ -1,6 +1,6 @@ /* - * $Id: store_io_diskd.cc,v 1.1.20.28 2002/12/09 12:11:13 rbcollins Exp $ + * $Id: store_io_diskd.cc,v 1.1.20.29 2002/12/10 22:38:14 rbcollins Exp $ * * DEBUG: section 79 Squid-side DISKD I/O functions. * AUTHOR: Duane Wessels @@ -285,6 +285,12 @@ } bool +DiskdFile::canRead() const +{ + return !error(); +} + +bool DiskdFile::canNotifyClient() const { if (!ioRequestor.getRaw()) { Index: squid3/src/fs/ufs/store_io_ufs.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/fs/ufs/store_io_ufs.cc,v retrieving revision 1.3.10.22 retrieving revision 1.3.10.23 diff -u -r1.3.10.22 -r1.3.10.23 --- squid3/src/fs/ufs/store_io_ufs.cc 9 Dec 2002 12:11:13 -0000 1.3.10.22 +++ squid3/src/fs/ufs/store_io_ufs.cc 10 Dec 2002 22:38:14 -0000 1.3.10.23 @@ -1,6 +1,6 @@ /* - * $Id: store_io_ufs.cc,v 1.3.10.22 2002/12/09 12:11:13 rbcollins Exp $ + * $Id: store_io_ufs.cc,v 1.3.10.23 2002/12/10 22:38:14 rbcollins Exp $ * * DEBUG: section 79 Storage Manager UFS Interface * AUTHOR: Duane Wessels @@ -160,6 +160,12 @@ } bool +UFSFile::canRead() const +{ + return fd > -1; +} + +bool UFSFile::error() const { if (fd < 0) Index: squid3/src/fs/ufs/store_ufs.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/fs/ufs/Attic/store_ufs.h,v retrieving revision 1.1.20.15 retrieving revision 1.1.20.16 diff -u -r1.1.20.15 -r1.1.20.16 --- squid3/src/fs/ufs/store_ufs.h 9 Dec 2002 12:11:14 -0000 1.1.20.15 +++ squid3/src/fs/ufs/store_ufs.h 10 Dec 2002 22:38:14 -0000 1.1.20.16 @@ -18,6 +18,7 @@ virtual void close (); virtual bool error() const; virtual int getFD() const { return fd;} + virtual bool canRead() const; private: int fd; char const *path_;