Commit 0d6d519
smb/client: preserve errors from smb2_set_sparse()
[ Upstream commit 2a4b3d2 ]
smb2_set_sparse() converts every FSCTL_SET_SPARSE failure to false and
marks sparse support as broken for the share. Callers therefore report
EOPNOTSUPP even for errors such as ENOSPC or EACCES, and later sparse
operations remain disabled until the share is unmounted.
Return the SMB2 ioctl error directly. Set broken_sparse_sup only for
EOPNOTSUPP, which indicates that the server does not support the request.
Update smb3_punch_hole() to propagate the error returned by
smb2_set_sparse().
Fixes: 3d1a374 ("Add sparse file support to SMB2/SMB3 mounts")
Signed-off-by: Huiwen He <hehuiwen@kylinos.cn>
Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent ea8e946 commit 0d6d519
1 file changed
Lines changed: 15 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1967 | 1967 | | |
1968 | 1968 | | |
1969 | 1969 | | |
1970 | | - | |
1971 | | - | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
1972 | 1973 | | |
1973 | 1974 | | |
1974 | 1975 | | |
| |||
1977 | 1978 | | |
1978 | 1979 | | |
1979 | 1980 | | |
1980 | | - | |
| 1981 | + | |
1981 | 1982 | | |
1982 | 1983 | | |
1983 | | - | |
| 1984 | + | |
1984 | 1985 | | |
1985 | 1986 | | |
1986 | 1987 | | |
1987 | 1988 | | |
1988 | 1989 | | |
1989 | 1990 | | |
1990 | | - | |
1991 | | - | |
1992 | | - | |
1993 | | - | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
1994 | 1994 | | |
1995 | 1995 | | |
1996 | | - | |
| 1996 | + | |
1997 | 1997 | | |
1998 | 1998 | | |
1999 | 1999 | | |
2000 | 2000 | | |
2001 | 2001 | | |
2002 | | - | |
| 2002 | + | |
| 2003 | + | |
2003 | 2004 | | |
2004 | | - | |
| 2005 | + | |
2005 | 2006 | | |
2006 | 2007 | | |
2007 | 2008 | | |
2008 | 2009 | | |
2009 | 2010 | | |
2010 | 2011 | | |
2011 | 2012 | | |
2012 | | - | |
| 2013 | + | |
2013 | 2014 | | |
2014 | 2015 | | |
2015 | 2016 | | |
| |||
3322 | 3323 | | |
3323 | 3324 | | |
3324 | 3325 | | |
3325 | | - | |
3326 | | - | |
| 3326 | + | |
| 3327 | + | |
3327 | 3328 | | |
3328 | | - | |
3329 | 3329 | | |
3330 | 3330 | | |
3331 | 3331 | | |
| |||
0 commit comments