[LU-1351] lfs path2fid and llapi_path2fid() fail for block or character special files Created: 27/Apr/12  Updated: 12/May/12  Resolved: 12/May/12

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.2.0, Lustre 2.3.0
Fix Version/s: Lustre 2.3.0

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: Yang Sheng
Resolution: Fixed Votes: 0
Labels: None
Environment:
  1. uname -r
    2.6.32-220.el6.l22.x86_64
  2. cat /proc/fs/lustre/version
    lustre: 2.2.0
    kernel: patchless_client
    build: 2.2.0--PRISTINE-2.6.32-220.13.1.el6.l22.x86_64

Severity: 3
Rank (Obsolete): 4628

 Description   

llapi_path2fid() compares errno to EINVAL rather than ENOTTY to test for failures due the file being block or character special.

  1. /usr/lib64/lustre/tests/llmount.sh
  2. cd /mnt/lustre
  3. mknod null c 1 3
  4. stat null
    File: `null'
    Size: 0 Blocks: 0 IO Block: 4096 character special file
    Device: 2c54f966h/743766374d Inode: 144115238810157090 Links: 1 Device type: 1,3
    Access: (0644/crw-r-r-) Uid: ( 0/ root) Gid: ( 0/ root)
    Access: 2012-04-27 09:14:40.000000000 -0500
    Modify: 2012-04-27 09:14:40.000000000 -0500
    Change: 2012-04-27 09:14:40.000000000 -0500
  5. lfs path2fid null
    can't get fid for null: Inappropriate ioctl for device


 Comments   
Comment by John Hammond [ 27/Apr/12 ]

See http://review.whamcloud.com/#change,2606 for the patch.

Comment by Peter Jones [ 30/Apr/12 ]

Yangsheng

Could you please handle the remaining inspection for this contributed patch?

Thanks

Peter

Comment by Yang Sheng [ 12/May/12 ]

Patch landed. Close bug.

Generated at Sat Feb 10 01:15:52 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.