Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging from dev for initial release #7

Merged
merged 34 commits into from
Oct 31, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
dc582ca
Fixed an issue in list show directory twice.
JasonYang-MSFT Sep 22, 2017
b1640f8
Fixed some comments.
JasonYang-MSFT Sep 22, 2017
e320860
Fixed several comments.
JasonYang-MSFT Sep 25, 2017
ded1f43
Fixed several comments.
JasonYang-MSFT Sep 25, 2017
1a47bce
Fixed a bug in is_directory_empty.
JasonYang-MSFT Sep 25, 2017
4d0b2ca
Dropped readonly.
JasonYang-MSFT Sep 25, 2017
51e35b7
Fixing numerous bugs, including race conditions with flock support an…
asorrin-msft Oct 18, 2017
3f72721
Adding tests to the repo. Proper testconfig not yet done.
asorrin-msft Oct 18, 2017
5b61ba7
[lite] Remove std::async inside executor to avoid sharing curl handle…
JasonYang-MSFT Oct 19, 2017
5c33eb1
[lite] Reduce copy in parallel upload/download.
JasonYang-MSFT Oct 20, 2017
629a2db
[lite] Added comments for blob_client.
JasonYang-MSFT Oct 20, 2017
ecba8a1
Merge remote-tracking branch 'yabo/dev1' into dev
asorrin-msft Oct 20, 2017
c11a9e8
Merge remote-tracking branch 'yabo/dev' into dev
asorrin-msft Oct 20, 2017
05e9932
Fixing issues from the merge and modifying readdir to report files th…
asorrin-msft Oct 21, 2017
0d1603b
Adding config options and changing file modes
asorrin-msft Oct 23, 2017
73e0217
Adding truncate-to-zero functionality
asorrin-msft Oct 24, 2017
8362543
rename file / directory
asorrin-msft Oct 25, 2017
0e6609b
Merge remote-tracking branch 'yabo/memfix' into dev
asorrin-msft Oct 25, 2017
7ccc498
Merge remote-tracking branch 'yabo/commentfix' into dev
asorrin-msft Oct 25, 2017
44742e8
Merge remote-tracking branch 'yabo/curlfix' into dev
asorrin-msft Oct 25, 2017
6d77d13
Fixing merge issues
asorrin-msft Oct 25, 2017
fea4f0a
Minor changes, to file perms and unimplemented functions
asorrin-msft Oct 25, 2017
09374f1
Fixing build error on ubuntu
asorrin-msft Oct 25, 2017
9df4dec
mount.sh update, changing name of config file parameter
asorrin-msft Oct 25, 2017
a7b4b04
Disabling printing
asorrin-msft Oct 25, 2017
7020e96
Fixing errno 115 from libcurl issue
asorrin-msft Oct 25, 2017
09f4128
Formatting changes, no more
asorrin-msft Oct 30, 2017
c934003
Updating README
asorrin-msft Oct 30, 2017
05c72e2
Fixing lack of error-checking in download_blob-to_stream
asorrin-msft Oct 30, 2017
ab8b2d7
Merge remote-tracking branch 'origin/dev' into dev
asorrin-msft Oct 30, 2017
0658304
Merge pull request #5 from asorrin-msft/dev
asorrin-msft Oct 30, 2017
770e692
README updates and fix for build.sh
Oct 30, 2017
9597df7
Test cleanup
asorrin-msft Oct 31, 2017
680fce1
Merge pull request #6 from asorrin-msft/dev
asorrin-msft Oct 31, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor changes, to file perms and unimplemented functions
  • Loading branch information
asorrin-msft committed Oct 25, 2017
commit fea4f0a79ef1b4090a055eafa42b6ef631fd7333
8 changes: 4 additions & 4 deletions blobfuse/directoryapis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ int azs_readdir(const char *path, void *buf, fuse_fill_dir_t filler, off_t, stru
if (dir_ent->d_type == DT_DIR)
{
struct stat stbuf;
stbuf.st_mode = S_IFDIR | 0700;
stbuf.st_mode = S_IFDIR | 0770;
stbuf.st_nlink = 2;
stbuf.st_size = 4096;
filler(buf, dir_ent->d_name, &stbuf, 0);
Expand All @@ -72,7 +72,7 @@ int azs_readdir(const char *path, void *buf, fuse_fill_dir_t filler, off_t, stru
stat((mntPathString + dir_ent->d_name).c_str(), &buffer);

struct stat stbuf;
stbuf.st_mode = S_IFREG | 0700; // Regular file (not a directory)
stbuf.st_mode = S_IFREG | 0770; // Regular file (not a directory)
stbuf.st_nlink = 1;
stbuf.st_size = buffer.st_size;
filler(buf, dir_ent->d_name, &stbuf, 0); // TODO: Add stat information. Consider FUSE_FILL_DIR_PLUS.
Expand Down Expand Up @@ -152,7 +152,7 @@ int azs_readdir(const char *path, void *buf, fuse_fill_dir_t filler, off_t, stru
if ((prev_token_str.size() > 0) && (strcmp(prev_token_str.c_str(), directorySignifier.c_str()) != 0))
{
struct stat stbuf;
stbuf.st_mode = S_IFREG | 0700; // Regular file (not a directory)
stbuf.st_mode = S_IFREG | 0770; // Regular file (not a directory)
stbuf.st_nlink = 1;
stbuf.st_size = listResults[i].content_length;
fillerResult = filler(buf, prev_token_str.c_str(), &stbuf, 0); // TODO: Add stat information. Consider FUSE_FILL_DIR_PLUS.
Expand All @@ -168,7 +168,7 @@ int azs_readdir(const char *path, void *buf, fuse_fill_dir_t filler, off_t, stru
if (prev_token_str.size() > 0)
{
struct stat stbuf;
stbuf.st_mode = S_IFDIR | 0700;
stbuf.st_mode = S_IFDIR | 0770;
stbuf.st_nlink = 2;
fillerResult = filler(buf, prev_token_str.c_str(), &stbuf, 0);
if (AZS_PRINT)
Expand Down
4 changes: 2 additions & 2 deletions blobfuse/fileapis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ int azs_open(const char *path, struct fuse_file_info *fi)
}

// TODO: Actual access control
fchmod(res, 0700);
fchmod(res, 0770);

// Stora the open file handle, and whether or not the file should be uploaded on close().
// TODO: Optimize the scenario where the file is open for read/write, but no actual writing occurs, to not upload the blob.
Expand Down Expand Up @@ -270,7 +270,7 @@ int azs_create(const char *path, mode_t mode, struct fuse_file_info *fi)
}
if (access(mntPathCopy, F_OK) != 0)
{
mkdir(mntPathCopy, 0700);
mkdir(mntPathCopy, 0770);
}
*cur = '/';
cur = cur + 1;
Expand Down
21 changes: 12 additions & 9 deletions blobfuse/utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ int ensure_files_directory_exists(const std::string file_path)
struct stat st;
if (stat(copypath, &st) != 0)
{
status = mkdir(copypath, 0700);
status = mkdir(copypath, 0770);
}
*slash = '/';
}
Expand Down Expand Up @@ -167,7 +167,7 @@ int azs_getattr(const char *path, struct stat *stbuf)
// If we're at the root, we know it's a directory
if (strlen(path) == 1)
{
stbuf->st_mode = S_IFDIR | 0700; // TODO: proper access control.
stbuf->st_mode = S_IFDIR | 0770; // TODO: proper access control.
stbuf->st_nlink = 2; // Directories should have a hard-link count of 2 + (# child directories). We don't have that count, though, so we jsut use 2 for now. TODO: Evaluate if we could keep this accurate or not.
stbuf->st_size = 4096;
return 0;
Expand Down Expand Up @@ -206,7 +206,7 @@ int azs_getattr(const char *path, struct stat *stbuf)
{
fprintf(stdout, "Blob found! Name = %s\n", path);
}
stbuf->st_mode = S_IFREG | 0700; // Regular file (not a directory)
stbuf->st_mode = S_IFREG | 0770; // Regular file (not a directory)
stbuf->st_nlink = 1;
stbuf->st_size = blob_property.size;
return 0;
Expand All @@ -233,7 +233,7 @@ int azs_getattr(const char *path, struct stat *stbuf)
{
fprintf(stdout, "Directory %s found with return value: %d!\n", blobNameStr.c_str(), dirSize);
}
stbuf->st_mode = S_IFDIR | 0700;
stbuf->st_mode = S_IFDIR | 0770;
// If st_nlink = 2, means direcotry is empty.
// Direcotry size will affect behaviour for mv, rmdir, cp etc.
stbuf->st_nlink = dirSize == D_EMPTY ? 2 : 3;
Expand Down Expand Up @@ -289,7 +289,7 @@ int azs_access(const char * /*path*/, int /*mask*/)

int azs_readlink(const char * /*path*/, char * /*buf*/, size_t /*size*/)
{
return 1; // ignore for mow
return -EINVAL; // not a symlink
}

int azs_fsync(const char * /*path*/, int /*isdatasync*/, struct fuse_file_info * /*fi*/)
Expand All @@ -300,12 +300,14 @@ int azs_fsync(const char * /*path*/, int /*isdatasync*/, struct fuse_file_info *
int azs_chown(const char * /*path*/, uid_t /*uid*/, gid_t /*gid*/)
{
//TODO: Implement
// return -ENOSYS;
return 0;
}

int azs_chmod(const char * /*path*/, mode_t /*mode*/)
{
//TODO: Implement
// return -ENOSYS;
return 0;

}
Expand All @@ -314,6 +316,7 @@ int azs_chmod(const char * /*path*/, mode_t /*mode*/)
int azs_utimens(const char * /*path*/, const struct timespec [2] /*ts[2]*/)
{
//TODO: Implement
// return -ENOSYS;
return 0;
}
// #endif
Expand Down Expand Up @@ -608,17 +611,17 @@ int azs_rename(const char *src, const char *dst)

int azs_setxattr(const char * /*path*/, const char * /*name*/, const char * /*value*/, size_t /*size*/, int /*flags*/)
{
return 0;
return -ENOSYS;
}
int azs_getxattr(const char * /*path*/, const char * /*name*/, char * /*value*/, size_t /*size*/)
{
return 0;
return -ENOSYS;
}
int azs_listxattr(const char * /*path*/, char * /*list*/, size_t /*size*/)
{
return 0;
return -ENOSYS;
}
int azs_removexattr(const char * /*path*/, const char * /*name*/)
{
return 0;
return -ENOSYS;
}