const char __user *buffer,
size_t count, loff_t *off)
{
+ static bool printed;
int val;
int rc;
if (rc < 0)
return rc;
+ if (!printed && val) {
+ struct seq_file *m = file->private_data;
+ struct super_block *sb = m->private;
+ struct ll_sb_info *sbi = ll_s2sbi(sb);
+
+ LCONSOLE_WARN("%s: file compression preview enabled\n",
+ sbi->ll_fsname);
+ printed = true;
+ }
llite_enable_compression = !!val;
return count;
enum ll_compr_type type, int level,
__u32 chunk_size, unsigned long long stripe_size)
{
+ static bool printed;
struct llapi_layout_comp *comp;
bool compr_level_set = false;
int log_bits;
if (type == LL_COMPR_TYPE_NONE)
return 0;
- if (getenv("LFS_SETSTRIPE_COMPR_OK") == NULL) {
+ if (!printed && getenv("LFS_SETSTRIPE_COMPR_OK") == NULL) {
fprintf(stderr,
- "WARNING: File compression is a technology preview feature and is not yet intended for production use. Compression is skipped for encrypted files.\n");
+ "WARNING: File compression is a technology preview feature and is not yet intended for production use. Compression is skipped for encrypted files. Set LFS_SETSTRIPE_COMPR_OK=y to acknowledge limitations.\n");
+ printed = true;
}
for (i = 0; i < ARRAY_SIZE(compr_type_table); i++) {