Skip to content

Commit

Permalink
Added GPL Copywrite
Browse files Browse the repository at this point in the history
  • Loading branch information
opendedup committed Aug 19, 2016
1 parent 4e2547c commit ade49ca
Show file tree
Hide file tree
Showing 252 changed files with 14,977 additions and 10,620 deletions.
Binary file modified install-packages/deb/usr/share/sdfs/lib/sdfs.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/fuse/SDFS/SDFSFileSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ else if (_f.isFile())
}

private int getFtype(String path) throws FuseException {
SDFSLogger.getLog().info("Path=" + path);
//SDFSLogger.getLog().info("Path=" + path);
String pt = mountedVolume + path;
File _f = new File(pt);

Expand Down
54 changes: 36 additions & 18 deletions src/org/opendedup/buse/driver/BUSE.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
package org.opendedup.buse.driver;

import java.nio.ByteBuffer;

public interface BUSE {
public int read(ByteBuffer data, int len, long offset);

public int write(ByteBuffer buff, int len, long offset);

public void disconnect();

public int flush();

public int trim(long from, int len);

public void close();

}
/*******************************************************************************
* Copyright (C) 2016 Sam Silverberg [email protected]
*
* This file is part of OpenDedupe SDFS.
*
* OpenDedupe SDFS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* OpenDedupe SDFS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Foobar. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
package org.opendedup.buse.driver;

import java.nio.ByteBuffer;

public interface BUSE {
public int read(ByteBuffer data, int len, long offset);

public int write(ByteBuffer buff, int len, long offset);

public void disconnect();

public int flush();

public int trim(long from, int len);

public void close();

}
112 changes: 65 additions & 47 deletions src/org/opendedup/buse/driver/BUSEMkDev.java
Original file line number Diff line number Diff line change
@@ -1,47 +1,65 @@
package org.opendedup.buse.driver;

import java.util.logging.Logger;

public class BUSEMkDev {

private static Logger log = Logger.getLogger(BUSEMkDev.class.getName());

static {
System.loadLibrary("jbuse");
}

public static int startdev(final String dev, long sz, int blksz, BUSE buse,
boolean readonly) throws Exception {

log.info("Mounted filesystem");
// ShutdownHook t = new ShutdownHook(dev,buse);
// Runtime.getRuntime().addShutdownHook(t);
int z = mkdev(dev, sz, blksz, buse, readonly);

log.info("Filesystem is unmounted");
return z;
}

public static void closeDev(final String dev) throws Exception {
closedev(dev);
}

public static void init() {
ThreadGroup threadGroup = new ThreadGroup(Thread.currentThread()
.getThreadGroup(), "BUSE Threads");
threadGroup.setDaemon(true);
init(threadGroup);
}

private static native int mkdev(String dev, long sz, int blksz, BUSE buse,
boolean readonly) throws Exception;

private static native void closedev(String dev) throws Exception;

private static native void init(ThreadGroup threadGroup);

public static native void release();

public static native void setSize(String dev, long sz);

}
/*******************************************************************************
* Copyright (C) 2016 Sam Silverberg [email protected]
*
* This file is part of OpenDedupe SDFS.
*
* OpenDedupe SDFS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* OpenDedupe SDFS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Foobar. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
package org.opendedup.buse.driver;

import java.util.logging.Logger;

public class BUSEMkDev {

private static Logger log = Logger.getLogger(BUSEMkDev.class.getName());

static {
System.loadLibrary("jbuse");
}

public static int startdev(final String dev, long sz, int blksz, BUSE buse,
boolean readonly) throws Exception {

log.info("Mounted filesystem");
// ShutdownHook t = new ShutdownHook(dev,buse);
// Runtime.getRuntime().addShutdownHook(t);
int z = mkdev(dev, sz, blksz, buse, readonly);

log.info("Filesystem is unmounted");
return z;
}

public static void closeDev(final String dev) throws Exception {
closedev(dev);
}

public static void init() {
ThreadGroup threadGroup = new ThreadGroup(Thread.currentThread()
.getThreadGroup(), "BUSE Threads");
threadGroup.setDaemon(true);
init(threadGroup);
}

private static native int mkdev(String dev, long sz, int blksz, BUSE buse,
boolean readonly) throws Exception;

private static native void closedev(String dev) throws Exception;

private static native void init(ThreadGroup threadGroup);

public static native void release();

public static native void setSize(String dev, long sz);

}
Loading

0 comments on commit ade49ca

Please sign in to comment.