Commit e227163b authored by Marc Vef's avatar Marc Vef
Browse files

Review: config name change

parent ad3f4968
Loading
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -66,11 +66,9 @@ constexpr auto na_sm = "na+sm";
} // namespace protocol
} // namespace gkfs::rpc

namespace gkfs::config::stats {
/**
 * Number 512-byte blocks allocated as it is in the linux kernel (struct_stat.h)
 */
namespace gkfs::config::syscall::stat {
// Number 512-byte blocks allocated as it is in the linux kernel (struct_stat.h)
constexpr auto st_nblocksize = 512;
} // namespace gkfs::config::stats
} // namespace gkfs::config::syscall::stat

#endif // GEKKOFS_COMMON_DEFS_HPP
+2 −3
Original line number Diff line number Diff line
@@ -268,11 +268,10 @@ metadata_to_stat(const std::string& path, const gkfs::metadata::Metadata& md,
    if(CTX->fs_conf()->link_cnt_state) {
        attr.st_nlink = md.link_count();
    }
    if(CTX->fs_conf()->blocks_state) { // last one will not encounter a
                                       // delimiter anymore
    if(CTX->fs_conf()->blocks_state) {
        attr.st_blocks = md.blocks();
    } else {
        attr.st_blocks = md.size() / gkfs::config::stats::st_nblocksize;
        attr.st_blocks = md.size() / gkfs::config::syscall::stat::st_nblocksize;
    }
    return 0;
}