-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement basic operations Signed-off-by: Xuanwo <[email protected]> * Remove build on windows Signed-off-by: Xuanwo <[email protected]> * Fix build Signed-off-by: Xuanwo <[email protected]> * Update badger Signed-off-by: Xuanwo <[email protected]> * Readdir is work Signed-off-by: Xuanwo <[email protected]> * Fix inode not found Signed-off-by: Xuanwo <[email protected]>
- Loading branch information
Showing
17 changed files
with
1,804 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,38 @@ | ||
package main | ||
|
||
import ( | ||
"os" | ||
|
||
"go.uber.org/zap" | ||
|
||
"github.com/beyondstorage/beyond-fs/fuse/hanwen" | ||
"github.com/beyondstorage/beyond-fs/vfs" | ||
) | ||
|
||
func main() { | ||
print("Hello, world!") | ||
logger, _ := zap.NewDevelopment() | ||
|
||
cfg := &vfs.Config{ | ||
StoragePath: os.Getenv("BEYONDFS_UNDER_PATH"), | ||
|
||
Logger: logger, | ||
} | ||
|
||
fs, err := vfs.NewFS(cfg) | ||
if err != nil { | ||
logger.Error("new fs", zap.Error(err)) | ||
return | ||
} | ||
|
||
srv, err := hanwen.New(&hanwen.Config{ | ||
FileSystem: fs, | ||
MountPoint: os.Getenv("BEYONDFS_MOUNT_PATH"), | ||
Logger: logger, | ||
}) | ||
if err != nil { | ||
logger.Error("new hanwen fuse", zap.Error(err)) | ||
return | ||
} | ||
|
||
srv.Serve() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package hanwen | ||
|
||
import "math" | ||
|
||
const ( | ||
BlockSize = 4096 | ||
MaximumSpace = 1024 * 1024 * 1024 * 1024 * 1024 // Set total space to 1PB | ||
MaximumBlocks = MaximumSpace / BlockSize | ||
MaximumInodes = math.MaxUint64 // Set maximum inodes to max uint64. | ||
) |
Oops, something went wrong.