return r;
}
-FileStoreBackend *FileStoreBackend::create(long f_type, FileStore *fs)
+FileStoreBackend *FileStoreBackend::create(unsigned long f_type, FileStore *fs)
{
switch (f_type) {
#if defined(__linux__)
}
}
-void FileStore::create_backend(long f_type)
+void FileStore::create_backend(unsigned long f_type)
{
m_fs_type = f_type;
#if defined(__linux__)
# ifndef BTRFS_SUPER_MAGIC
-#define BTRFS_SUPER_MAGIC 0x9123683EL
+#define BTRFS_SUPER_MAGIC 0x9123683EUL
# endif
# ifndef XFS_SUPER_MAGIC
-#define XFS_SUPER_MAGIC 0x58465342L
+#define XFS_SUPER_MAGIC 0x58465342UL
# endif
# ifndef ZFS_SUPER_MAGIC
-#define ZFS_SUPER_MAGIC 0x2fc12fc1L
+#define ZFS_SUPER_MAGIC 0x2fc12fc1UL
# endif
#endif
FileStoreBackend *backend;
- void create_backend(long f_type);
+ void create_backend(unsigned long f_type);
deque<uint64_t> snaps;
bool m_filestore_sloppy_crc;
int m_filestore_sloppy_crc_block_size;
uint64_t m_filestore_max_alloc_hint_size;
- long m_fs_type;
+ unsigned long m_fs_type;
//Determined xattr handling based on fs type
void set_xattr_limits_via_conf();
return filestore->cct;
}
- static FileStoreBackend *create(long f_type, FileStore *fs);
+ static FileStoreBackend *create(unsigned long f_type, FileStore *fs);
virtual const char *get_name() = 0;
virtual int detect_features() = 0;
}
}
- auto handles = std::vector<librados::Rados>{cct->_conf->rgw_num_rados_handles};
+ auto handles = std::vector<librados::Rados>{static_cast<size_t>(cct->_conf->rgw_num_rados_handles)};
for (auto& r : handles) {
ret = r.init_with_context(cct);
reenter(this) {
for (;;) {
set_status("sleeping");
- wait(utime_t{config.trim_interval_sec, 0});
+ wait(utime_t{static_cast<time_t>(config.trim_interval_sec), 0});
// prevent others from trimming for our entire wait interval
set_status("acquiring trim lock");
class TestFileStore {
public:
- static void create_backend(FileStore &fs, long f_type) {
+ static void create_backend(FileStore &fs, unsigned long f_type) {
fs.create_backend(f_type);
}
};