[LU-9986] Cannot write to ldiskfs prealloc_table proc file Created: 13/Sep/17  Updated: 25/Dec/17  Resolved: 25/Dec/17

Status: Closed
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.10.0
Fix Version/s: Lustre 2.11.0

Type: Bug Priority: Minor
Reporter: Ian Ziemba Assignee: Yang Sheng
Resolution: Duplicate Votes: 0
Labels: None
Environment:

RHEL7, SLES12


Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

For Lustre servers using ldiskfs, the prealloc_table cannot be updated through the proc file.

# echo 1024 2048 4096 > /proc/fs/ldiskfs/md0/prealloc_table
-bash: echo: write error: Invalid argument



# ls -l /proc/fs/ldiskfs/md0/prealloc_table
-rw-r--r-- 1 root root 0 Sep 13 04:42 /proc/fs/ldiskfs/md0/prealloc_table



The issue appears to be caused by the usage of kstrtol in ldiskfs_mb_prealloc_table_proc_write. Unlike simple_strtol, kstrtol does not provide an end pointer. This causes -EINVAL to be returned due to the cur pointer not getting updated.



 Comments   
Comment by Peter Jones [ 21/Dec/17 ]

Yang Sheng

Can you please look into this one?

Thanks

Petery

Comment by Yang Sheng [ 25/Dec/17 ]

Duplicated with LU-9814.

Generated at Sat Feb 10 02:31:02 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.