| To: | Eric Sandeen <sandeen@xxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 15/19] mkfs: don't treat files as though they are block devices |
| From: | Jan Tulak <jtulak@xxxxxxxxxx> |
| Date: | Fri, 8 Apr 2016 16:58:19 +0200 |
| Cc: | xfs-oss <xfs@xxxxxxxxxxx> |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <5706FA7C.7020103@xxxxxxxxxxx> |
| References: | <1458818136-56043-1-git-send-email-jtulak@xxxxxxxxxx> <1458818136-56043-16-git-send-email-jtulak@xxxxxxxxxx> <5706FA7C.7020103@xxxxxxxxxxx> |
âA simple if NULL, then usage() should take care of this...
âNo, a->disfile is set to 1 implicitly if the target is a file inÂcheck_device_type(): 1070 Â Â Â Âif (S_ISREG(statbuf.st_mode)) { 1071 Â Â Â Â Â Â Â if (!*isfile) 1072 Â Â Â Â Â Â Â Â Â Â Â*isfile = 1; Â Hm but you removed that (see below) âWhat is removed? Where exactly? Or it should be "above"? > +Â Â Â Â Â Â Â Â Â Â Âstatres = stat(dname, &st); > +Â Â Â Â Â Â Â Â Â Â Âstatres += statfs(dname, &stfs); (and if there's a reason, why only for ->disfile but not ->lisfile?) âBecause I forgot or didn't noticed. :-) Adding to lisfile and rtfile too. â Â
âI'm removing this change.
âAdded.â Â
âBut DIO is disabled for the files, per the commit message: [...] and turning off direct IO. Then ensure that we check the "isfile" options before doing things that are specific to block devices. Also, as direct IO is disabled for files, use statfs() for getting host FS blocksize, not platform_findsizes().â So we have to use whatever the underlying fs tells us, not what the physical device has, right? âRather, I wonder if there is any reason to keep the platform_findsizes part about regular files - it shouldn't get into the branch ever. Â
âThis looks like a bug, I think the assignment should stay here. â Â
âSure. â Â
â(inserting your next email)â Â
âOK, better to be sure. :-) â Â
âOn few places, the original patch looked as if files had direct IO still enabledâ (using platform_findsize...), and I think it was causing some failures - fixing issues is why I did most of the changes. I will revert to the original version and see what exactly fails. But with being Friday late afternoon, the results will be available the next week (Wednesday and further, all my courses at university are stuffed in Mon/Tue). Cheers, Jan  |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: XFS hung task in xfs_ail_push_all_sync() when unmounting FS after disk failure/recovery, Carlos Maiolino |
|---|---|
| Next by Date: | Ich bitte um Ihre Unterstuetzung!!, Angela Odum |
| Previous by Thread: | Re: [PATCH 15/19] mkfs: don't treat files as though they are block devices, Eric Sandeen |
| Next by Thread: | Re: [PATCH 15/19] mkfs: don't treat files as though they are block devices, Eric Sandeen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |