Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


nbd updates
[palacios.git] / misc / network_servers / v3_nbd / v3_disk.h
similarity index 82%
rename from misc/network_servers/v3_nbd/v3_nbd.h
rename to misc/network_servers/v3_nbd/v3_disk.h
index f413c10..9b7ce17 100644 (file)
 using namespace std;
 
 class v3_disk {
- private:
-    v3_disk();
 
-    string filename;
+ public:
+    v3_disk(string & filename);
+    virtual ~v3_disk();
 
-    int in_use;
+    virtual off_t get_capacity()=0;
+    virtual int read(unsigned char * buf, unsigned long long offset, int length)=0;
+    virtual int write(unsigned char * buf, unsigned long long offset, int length)=0;
+
+    virtual void attach()=0;
+    virtual void detach()=0;
+
+    int locked;
+
+    string filename;
+ private:
 
- public:
-    virtual unsigned long long get_capacity();
-    virtual int read(unsigned char * buf, unsigned long long offset, int length);
-    virtual int write(unsigned char * buf, unsigned long long offset, int length);
 
 };