From ea7dfa79b8e49ef13b1025648c6ddfe5c72cbcdc Mon Sep 17 00:00:00 2001 From: WangRunji Date: Mon, 11 Feb 2019 13:09:17 +0800 Subject: [PATCH] remove useless log, just switch to DEBUG level --- rcore-fs-fuse/src/main.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/rcore-fs-fuse/src/main.rs b/rcore-fs-fuse/src/main.rs index 410c3c8..4960979 100644 --- a/rcore-fs-fuse/src/main.rs +++ b/rcore-fs-fuse/src/main.rs @@ -91,7 +91,6 @@ macro_rules! try_vfs { impl Filesystem for VfsWrapper { fn lookup(&mut self, _req: &Request, parent: u64, name: &OsStr, reply: ReplyEntry) { - info!("lookup parent={} name={}", parent, name.to_str().unwrap()); let inode = try_vfs!(reply, self.get_inode(parent)); let target = try_vfs!(reply, inode.lookup(name.to_str().unwrap())); let info = try_vfs!(reply, target.info()); @@ -101,7 +100,6 @@ impl Filesystem for VfsWrapper { } fn getattr(&mut self, _req: &Request, ino: u64, reply: ReplyAttr) { - info!("getattr ino={}", ino); let inode = try_vfs!(reply, self.get_inode(ino)); let info = try_vfs!(reply, inode.info()); let attr = Self::trans_attr(info); @@ -110,7 +108,6 @@ impl Filesystem for VfsWrapper { fn mknod(&mut self, _req: &Request, parent: u64, name: &OsStr, mode: u32, _rdev: u32, reply: ReplyEntry) { let name = name.to_str().unwrap(); - info!("mknod parent={} name={} mode={}", parent, name, mode); let inode = try_vfs!(reply, self.get_inode(parent)); let target = try_vfs!(reply, inode.create(name, vfs::FileType::File)); let info = try_vfs!(reply, target.info()); @@ -121,7 +118,6 @@ impl Filesystem for VfsWrapper { fn mkdir(&mut self, _req: &Request, parent: u64, name: &OsStr, mode: u32, reply: ReplyEntry) { let name = name.to_str().unwrap(); - info!("mkdir parent={} name={} mode={}", parent, name, mode); let inode = try_vfs!(reply, self.get_inode(parent)); let target = try_vfs!(reply, inode.create(name, vfs::FileType::Dir)); let info = try_vfs!(reply, target.info()); @@ -131,21 +127,18 @@ impl Filesystem for VfsWrapper { fn unlink(&mut self, _req: &Request, parent: u64, name: &OsStr, reply: ReplyEmpty) { let name = name.to_str().unwrap(); - info!("unlink parent={} name={}", parent, name); let parent = try_vfs!(reply, self.get_inode(parent)); try_vfs!(reply, parent.unlink(name)); reply.ok(); } fn rmdir(&mut self, req: &Request, parent: u64, name: &OsStr, reply: ReplyEmpty) { - info!("rmdir -> unlink"); self.unlink(req, parent, name, reply); } fn rename(&mut self, _req: &Request, parent: u64, name: &OsStr, newparent: u64, newname: &OsStr, reply: ReplyEmpty) { let name = name.to_str().unwrap(); let newname = newname.to_str().unwrap(); - info!("rename parent={} name={} newparent={} newname={}", parent, name, newparent, newname); if parent == newparent { let parent = try_vfs!(reply, self.get_inode(parent)); try_vfs!(reply, parent.rename(name, newname)); @@ -159,7 +152,6 @@ impl Filesystem for VfsWrapper { fn link(&mut self, _req: &Request, ino: u64, newparent: u64, newname: &OsStr, reply: ReplyEntry) { let newname = newname.to_str().unwrap(); - info!("link ino={} newparent={} newname={}", ino, newparent, newname); let inode = try_vfs!(reply, self.get_inode(ino)); let newparent = try_vfs!(reply, self.get_inode(newparent)); try_vfs!(reply, newparent.link(newname, inode)); @@ -169,7 +161,6 @@ impl Filesystem for VfsWrapper { } fn read(&mut self, _req: &Request, ino: u64, _fh: u64, offset: i64, size: u32, reply: ReplyData) { - info!("read ino={} offset={} size={}", ino, offset, size); let inode = try_vfs!(reply, self.get_inode(ino)); let mut data = Vec::::new(); data.resize(size as usize, 0); @@ -178,28 +169,24 @@ impl Filesystem for VfsWrapper { } fn write(&mut self, _req: &Request, ino: u64, _fh: u64, offset: i64, data: &[u8], flags: u32, reply: ReplyWrite) { - info!("write ino={} offset={} size={} flags={}", ino, offset, data.len(), flags); let inode = try_vfs!(reply, self.get_inode(ino)); let len = try_vfs!(reply, inode.write_at(offset as usize, data)); reply.written(len as u32); } fn flush(&mut self, _req: &Request, ino: u64, _fh: u64, _lock_owner: u64, reply: ReplyEmpty) { - info!("flush ino={}", ino); let inode = try_vfs!(reply, self.get_inode(ino)); try_vfs!(reply, inode.sync()); reply.ok(); } fn fsync(&mut self, _req: &Request, ino: u64, _fh: u64, _datasync: bool, reply: ReplyEmpty) { - info!("fsync ino={}", ino); let inode = try_vfs!(reply, self.get_inode(ino)); try_vfs!(reply, inode.sync()); reply.ok(); } fn readdir(&mut self, _req: &Request, ino: u64, _fh: u64, offset: i64, mut reply: ReplyDirectory) { - info!("readdir ino={}, offset={}", ino, offset); let inode = try_vfs!(reply, self.get_inode(ino)); let info = try_vfs!(reply, inode.info()); let count = info.size;